After Saul's death, when David had returned from defeating the Amalekites, he stayed in Ziklag two days.
References for 2 Samuel 1:1
On the third day, a man showed up from Saul's camp with his clothes torn and dirt on his head. When he reached David, he fell to the ground, bowing low out of respect.
"Where have you come from?" David asked him. "I've escaped from the Israelite army!" he answered.
"What's the report?" David asked him. "Tell me!" The man answered, "The troops fled from the battle! Many of the soldiers have fallen and died. What's more, Saul and his son Jonathan have also died!"
"How do you know," David asked the young man who brought the news, "that Saul and his son Jonathan are dead?"
The young man who brought the news replied, "I just happened to be on Mount Gilboa and Saul was there, leaning on his spear, with chariots and horsemen closing in on him.
He turned around and saw me, then he called to me. ‘Yes, sir,' I answered.
‘Who are you?' he asked, and I told him, ‘I'm an Amalekite.'
He said to me, ‘Please come over here and kill me, because convulsions have come over me but I'm still alive.'
References for 2 Samuel 1:9
So I went over to him and killed him, because I knew he couldn't survive after being wounded like that. I took the crown that was on his head and the bracelet that was on his arm, and I've brought them here to you, my master."
Then David grabbed his clothes and ripped them—and all his soldiers did the same.
They mourned and cried and fasted until evening for Saul, his son Jonathan, the LORD's army, and the whole house of Israel, because they had died by the sword.
"Where are you from?" David asked the young man who brought him the news. "I'm the son of an immigrant," he answered. "An Amalekite."
Then David said to him, "How is it that you weren't afraid to raise your hand and destroy the LORD's anointed?"
Then David called for one of the young servants. "Come here!" he said. "Strike him down!" So the servant struck the Amalekite down, and he died.
"Your blood is on your own head," David said to the Amalekite, "because your own mouth testified against you when you admitted, ‘I killed the LORD's anointed.'"
Then David sang this funeral song for Saul and his son Jonathan.
References for 2 Samuel 1:17
David ordered everyone in Judah to learn the Song of the Bow. (In fact, it is written in the scroll from Jashar.)
References for 2 Samuel 1:18
Oh, no, Israel! Your prince lies dead on your heights. Look how the mighty warriors have fallen!
References for 2 Samuel 1:19
Don't talk about it in Gath; don't bring news of it to Ashkelon's streets, or else the Philistines' daughters will rejoice; the daughters of the uncircumcised will celebrate.
You hills of Gilboa! Let there be no dew or rain on you, and no fields yielding grain offerings. Because it was there that the mighty warrior's shield was defiled— the shield of Saul!— never again anointed with oil.
References for 2 Samuel 1:21
Jonathan's bow never wavered from the blood of the slain, from the gore of the warriors. Never did Saul's sword return empty.
Saul and Jonathan! So well loved, so dearly cherished! In their lives and in their deaths they were never separated. They were faster than eagles, stronger than lions!
Daughters of Israel, weep over Saul! He dressed you in crimson with jewels; he decorated your clothes with gold jewelry.
Look how the mighty warriors have fallen in the midst of battle! Jonathan lies dead on your heights.
I grieve for you, my brother Jonathan! You were so dear to me! Your love was more amazing to me than the love of women.
References for 2 Samuel 1:26
Look how the mighty warriors have fallen! Look how the weapons of war have been destroyed!