Wherefore hast thou despised the commandment of the Lord, to do
evil in his sight?
&c.] The commandment referred to is the law of God, particularly the sixth and seventh precepts of it, ( Exodus 20:13 Exodus 20:14 ) ; which David had shown no regard unto, and by his breaking them had slighted and despised them:
thou hast killed Uriah the Hittite with the sword;
and so had despised and broken the sixth command, ( Exodus 20:13 ) ; for though he had not taken away his life with his own hand, he had plotted and contrived it, and had given orders to put him in such a position as would issue in it:
and hast taken his wife [to be] thy wife;
after he had defiled her, being another man's wife, and had taken such unlawful methods to make her his wife, whereby he had despised and broken both the sixth and the seventh commands, ( Exodus 20:13 Exodus 20:14 ) :
and hast slain him with the sword of the children of Ammon;
though he had not put him to death with his own sword, he had done that which was as bad or worse in some respects, he had exposed him to the sword of the Ammonites, by which it was taken away; and not his only, but that of some of the Israelites also, which gave that uncircumcised people reason to triumph over the children of Israel, and even to blaspheme the God of Israel.