2 Samuel 12:27

And Joab sent messengers to David, and said, I have fought against Rabbah, and have taken the city of waters.

This verse belongs to the account of David's adultery and his murder of Uriah. Uriah himself was made the bearer of his own death-warrant, a letter sent by his hand from David to Joab commanding Joab to set Uriah in the forefront of the hottest battle and retire from him that he might be smitten and die. Joab, already stained with the guilt of one wanton murder, did not hesitate to obey the king's instructions, and Uriah fell by the sword of the children of Ammon.

In the execution of that order Joab sent word to David carefully worded so as not to implicate Joab or the king. He charged the messenger that when he had made an end of telling the matters of the war, if the king's wrath arose, he was to add that Uriah the Hittite was dead also. The messenger came and showed David all that Joab had sent him for, and David answered that Joab should not let the thing displease him, for the sword devours one as well as another, but should make battle more strong against the city and overthrow it and be encouraged.

Joab's carrying out of the unlawful command shows allegiance given to the king rather than to God, transgressing God's law because the king commanded it. David had for the time departed from God and yielded to the wicked one, becoming for the time the agent of wrong, yet he still held the position and authority God had given him and claimed an obedience that would imperil the soul of him who yielded it. His royal power was given by God to be exercised only in harmony with the divine law, so when he commanded that which was contrary to God's law it became sin to obey. His standing as king was secure when he kept God's Word beside him, but forsaking its teachings led him into sin, stained his reputation, and brought retribution upon him.