2 Samuel 11:12

And David said to Uriah, Tarry here to day also, and to morrow I will let thee depart. So Uriah abode in Jerusalem that day, and the morrow.

The verse records David asking Uriah to tarry in Jerusalem that day and the next, so Uriah remained in Jerusalem. David's idleness had left room for temptation, and useful, diligent employment of time and abilities would have kept him from the sin that led to Uriah's murder. Purposeful use of one's abilities guards against foolish thoughts and evil actions, for David's failure to occupy himself in useful work led to that murder.

Though especially favored by God and entrusted with great responsibility, David was led through appetite and passion to incur God's displeasure, showing that even such a man could fall under temptation. David detained Uriah in Jerusalem as part of his attempt to conceal his adultery and his sin against Uriah and Bath-sheba, trying to prevent the guilt from being traced to him. He intended thereby to remove suspicion and to marry Bathsheba. He had been steadfast while he kept God's Word before him, but when he turned from its teachings he stained his once-honorable reputation, for violating God's will brings retribution.

The concealment led into arranging Uriah's death in battle: David sent Uriah carrying the order that put him in the fiercest fighting, and Uriah was killed by the Ammonites. Joab then reported Uriah's death and David responded. David's command to kill Uriah was an abuse of royal authority, for his authority came from God and was to be used in harmony with God's law, and because the command violated that law Joab sinned by obeying it. One wrong step led to another in David's grievous crime against Uriah and Bath-sheba, and God did not excuse it. Nathan rebuked him, and David acknowledged his guilt with sincere grief and confessed. God forgave him and spared his life because he repented, yet pronounced punishment because his treatment of Uriah gave the Lord's enemies occasion to blaspheme.

The account shows that God does not justify anyone for breaking His commandments, even someone once favored for faithfully following Him, for past righteousness does not save the righteous when they turn to evil. The record of such failures is preserved as an honest account of human weakness and as a warning against sin. Seeing that believers struggled and fell yet could rise again through God's grace encourages others to renew the conflict and keep pressing on.