When the Philistines attacked the Israelites, the Israelites ran away from the Philistines, and many fell dead on Mount Gilboa.
References for 1 Samuel 31:1
The Philistines overtook Saul and his sons, and they killed his sons Jonathan, Abinadab, and Malchishua.
The battle was fierce around Saul. When the archers located him, they wounded him badly.
References for 1 Samuel 31:3
Saul said to his armor-bearer, "Draw your sword and kill me with it! Otherwise, these uncircumcised men will come and kill me or torture me." But his armor-bearer refused because he was terrified. So Saul took the sword and impaled himself on it.
When the armor-bearer saw that Saul was dead, he also impaled himself on his sword and died with Saul.
So Saul, his three sons, his armor-bearer, and all his soldiers died together that day.
When the Israelites across the valley and across the Jordan learned that the Israelite army had fled and that Saul and his sons were dead, they abandoned their towns and fled. So the Philistines came and occupied the towns.
The next day, when the Philistines came to strip the dead, they found Saul and his three sons lying dead on Mount Gilboa.
They cut off Saul's head and stripped off his armor, and then sent word throughout Philistine territory, carrying the good news to their gods' temples and to their people.
They put Saul's armor in the temple of Astarte, and hung his body on the wall of Beth-shan.
But when all the people of Jabesh-gilead heard what the Philistines had done to Saul,
the bravest of their men set out, traveled all night long, and took the bodies of Saul and his sons off the wall of Beth-shan. Then they went back to Jabesh, where they burned them.
Then they took their bones and buried them under the tamarisk tree at Jabesh, and they fasted seven days.