Who was Joab?
Joab is first introduced in the narrative of the war with Abner, who supported the claims of Ishbosheth to the throne against those of David (2 Samuel 2:8 through 3:1).
The two armies met, and on Abner's suggestion a tournament took place between 12 men from each side; a general engagement follows, and in this Joab's army is victorious. Asahel, Joab's brother, is killed in his pursuit of Abner, but the latter's army is sorely pressed, and he appeals to Joab for a cessation of hostilities. Joab calls a halt, but declares that he would not cease had Abner not made his plea.
2 Samuel 3:12-29 . Abner visits David at Hebron, and makes an alliance with David. He then leaves the town, apparently under royal protection. Joab is absent at the time, but returns immediately after Abner's departure, and expostulates with David for not avenging Asahel's death, and at the same time attributes a bad motive to Abner's visit. He sends a message, no doubt in the form of a royal command, for Abner to return; the chief does so, is taken aside "into the midst of the gate" (or as Septuagint and commentators read, "into the side of the gate," 2 Samuel 3:27 ), and slain there by Joab.
David proclaims his own innocence in the matter, commands Joab as well as the people to mourn publicly for the dead hero (2 Samuel 3:31 ), composes a lament for Abner, and pronounces a curse upon Joab and his descendants (2 Samuel 3:30 is regarded as an editorial note, and commentators change 2 Samuel 3:39 ).
IBSE, "Isaac" (in the public domain) with minor edits.