1. Since it was almost time for David to die, he gave his son Solomon his last commands.
2. David said, "My time to die is near. Be a good and strong leader.
3. Obey the Lord your God. Follow him by obeying his demands, his commands, his laws, and his rules that are written in the teachings of Moses. If you do these things, you will be successful in all you do and wherever you go.
4. And if you obey the Lord, he will keep the promise he made to me. He said: 'If your descendants live as I tell them and have complete faith in me, a man from your family will always be king over the people of Israel.'
5. "Also, you remember what Joab son of Zeruiah did to me. He killed the two commanders of Israel's armies: Abner son of Ner and Amasa son of Jether. He did this as if he and they were at war, although it was a time of peace. He put their blood on the belt around his waist and on his sandals on his feet.
6. Punish him in the way you think is wisest, but do not let him die peacefully of old age.
7. "Be kind to the children of Barzillai of Gilead, and allow them to eat at your table. They welcomed me when I ran away from your brother Absalom.
8. "And remember, Shimei son of Gera, the Benjaminite, is here with you. He cursed me the day I went to Mahanaim. But when he came down to meet me at the Jordan River, I promised him before the Lord, 'Shimei, I will not kill you.'
9. But you should not leave him unpunished. You are a wise man, and you will know what to do to him, but you must be sure he is killed."
10. Then David died and was buried with his ancestors in Jerusalem.
11. He had ruled over Israel forty years -- seven years in Hebron and thirty-three years in Jerusalem.
12. Solomon became king after David, his father, and he was in firm control of his kingdom.
13. At this time Adonijah son of Haggith went to Bathsheba, Solomon's mother. "Do you come in peace?" Bathsheba asked. "Yes. This is a peaceful visit," Adonijah answered.
14. "I have something to say to you." "You may speak," she said.
15. "You remember that at one time the kingdom was mine," Adonijah said. "All the people of Israel recognized me as their king, but things have changed. Now my brother is the king, because the Lord chose him.
16. Now I have one thing to ask you; please do not refuse me." Bathsheba answered, "What do you want?"
17. "I know King Solomon will do anything you ask him," Adonijah continued. "Please ask him to give me Abishag the Shunammite to be my wife."
18. "Very well," she answered. "I will speak to the king for you."
19. So Bathsheba went to King Solomon to speak to him for Adonijah. When Solomon saw her, he stood up to meet her, then bowed down, and sat on the throne. He told some servants to bring another throne for his mother. Then she sat down at his right side.
20. Bathsheba said, "I have one small thing to ask you. Please do not refuse me." "Ask, mother," the king answered. "I will not refuse you."
21. So she said, "Allow Abishag the Shunammite to marry your brother Adonijah."
22. King Solomon answered his mother, "Why do you ask me to give him Abishag? Why don't you also ask for him to become the king since he is my older brother? Abiathar the priest and Joab son of Zeruiah would support him!"
23. Then King Solomon swore by the name of the Lord, saying, "May God punish me terribly if this doesn't cost Adonijah his life!
24. By the Lord who has given me the throne that belonged to my father David and who has kept his promise and given the kingdom to me and my people, Adonijah will die today!"
25. Then King Solomon gave orders to Benaiah son of Jehoiada, and he went and killed Adonijah.
26. King Solomon said to Abiathar the priest, "I should kill you too, but I will allow you to go back to your fields in Anathoth. I will not kill you at this time, because you helped carry the Ark of the Lord God while marching with my father David. And I know you shared in all the hard times with him."
27. Then Solomon removed Abiathar from being the Lord's priest. This happened as the Lord had said it would, when he was speaking in Shiloh about the priest Eli and his descendants.
28. When Joab heard about what had happened, he was afraid. He had supported Adonijah but not Absalom. So Joab ran to the Tent of the Lord and took hold of the corners of the altar.
29. Someone told King Solomon that Joab had run to the Tent of the Lord and was beside the altar. Then Solomon ordered Benaiah to go and kill him.
30. Benaiah went into the Tent of the Lord and said to Joab, "The king says, 'Come out!'" But Joab answered, "No, I will die here." So Benaiah went back to the king and told him what Joab had said.
31. Then the king ordered Benaiah, "Do as he says! Kill him there and bury him. Then my family and I will be free of the guilt of Joab, who has killed innocent people.
32. Without my father knowing it, he killed two men who were much better than he was -- Abner son of Ner, the commander of Israel's army, and Amasa son of Jether, the commander of Judah's army. So the Lord will pay him back for those deaths.
33. Joab and his family will be forever guilty for their deaths, but there will be peace from the Lord for David, his descendants, his family, and his throne forever."
34. So Benaiah son of Jehoiada killed Joab, and he was buried near his home in the desert.
35. The king then made Benaiah son of Jehoiada commander of the army in Joab's place. He also made Zadok the new high priest in Abiathar's place.
36. Next the king sent for Shimei. Solomon said to him, "Build a house for yourself in Jerusalem and live there. Don't leave the city.
37. The very day you leave and cross the Kidron Valley, someone will kill you, and it will be your own fault."
38. So Shimei answered the king, "I agree with what you say. I will do what you say, my master and king." So Shimei lived in Jerusalem for a long time.
39. But three years later two of Shimei's slaves ran away to Achish king of Gath, who was the son of Maacah. Shimei heard that his slaves were in Gath,
40. so he put his saddle on his donkey and went to Achish at Gath to find them. Then he brought them back from Gath.
41. Someone told Solomon that Shimei had gone from Jerusalem to Gath and had returned.
42. So Solomon sent for Shimei and said, "I made you promise in the name of the Lord not to leave Jerusalem. I warned you if you went out anywhere you would die, and you agreed to what I said.
43. Why did you break your promise to the Lord and disobey my command?"
44. The king also said, "You know the many wrong things you did to my father David, so now the Lord will punish you for those wrongs.
45. But the Lord will bless me and make the rule of David safe before the Lord forever."
46. Then the king ordered Benaiah to kill Shimei, and he did. Now Solomon was in full control of his kingdom.