While on the roof of his palace one day, King David spotted a beautiful woman bathing. Instantly attracted, King David had the woman, Bathsheba, brought to his palace. He then slept with her.
Soon afterwards Bathsheba, who was already married, sent word to David that she was pregnant. In an attempt to cover up the affair, David recalled Bathsheba's husband, Uriah the Hittite, from where he was serving as a warrior fighting for Israel.
Despite showing Uriah all-out hospitality and even getting him drunk, David was unable to persuade him to return home to sleep with his wife. Uriah, a loyal military man, felt duty-bound not to indulge in such a luxury while his fellow soldiers were risking their lives on the battlefield.