2 Samuel 20:8

When they were at the great stone which is in Gibeon, Amasa went before them. And Joab’s garment that he had put on was girded unto him, and upon it a girdle with a sword fastened upon his loins in the sheath thereof; and as he went forth it fell out.

When they were at the great stone in Gibeon belongs to the revolt of Sheba son of Bichri after the suppression of Absalom's revolt. A quarrel between the men of Judah and the men of Israel gave occasion for that revolt. The revolt threatened serious harm. At that place Joab treacherously killed Amasa near Gibeon.

This killing continues David's troubles as God's chastening judgments for his sin in the case of Uriah. The subsequent history in 2 Samuel 11-24 and 1 Kings 1-2 shows how Nathan's denunciation after David's great wickedness was completely accomplished in the judgments that came upon David. David's transgression gave great occasion to the enemies of the Lord to blaspheme, and it is not covered up or excused. David himself placed on record for all future time a most humble confession of his great transgression.