David and Bathsheba
The fact that he had been the cause, however indirect, of the destruction of the holy city of Nob and the fall of Saul and his house, troubled David's mind considerably. He knew that severe trials lay ahead of him, but he did not know how and when they would come.
It was during the war with the Ammonites that the first grievous sin was committed by David.
Being a prophet, David knew that his heir and successor would be the son that would be born to him and Bathsheba, a woman of renown, famous for her excellence of character, no less than for her unsurpassed beauty. David learned, however, that she was married to Uriah, a captain fighting under Joab's command. Now it was customary in those days for married men, before going to war, to obtain a divorce from their wives, so that, in the event of their being "missing" in battle, their wives could get married again. Uriah had accordingly obtained a divorce from his wife. David wished to marry Bathsheba at once. He summoned Uriah to him, and, in the course of discussion, Uriah insulted the king. David could have had Uriah tried for high treason, but he was afraid that the trial might be considered a means of getting rid of him. David permitted Uriah to return to the battle field but instructed Joab that he should not endanger the lives of other soldiers to save Uriah from any predicament, for he deserved death in any case. Joab acted upon these instructions and Uriah fell, pierced by an Ammonite archer. In due time, Uriah's widow became David's wife. But David was soon to learn that his deed had greatly angered G‑d.
The Poor Man's Lamb
The Prophet Nathan came to David with a stern message. He used the following parable: "There were two men in one city, the one rich and the other poor. The rich man had very many flocks and herds, but the poor man had nothing, save one little ewe lamb, which he had bought and nourished, and it grew up together with him and with his children; it ate of his own bread and drank of his own cup, and lay in his bosom, and was to him as a daughter. And there came a traveler to the rich man, and he spared to take of his own flock and of his own herd to dress for the wayfaring man that was come to him, but took the poor man's lamb, and dressed it for the man that was come to him."
David's anger was kindled against that cruel man, and he exclaimed that the culprit should be put to death. Then the prophet Nathan said to David, "Thou art the man!"
The prophet proceeded to upbraid David for his sinful deed. David humbly acknowledged his sin and prayed for G‑d's forgiveness. The Prophet told him that G‑d would spare his life, but that he would not escape many misfortunes.
The first tragedy came when Bathsheba's first-born died soon after his birth. David accepted the punishment with real humility.
Birth of Solomon
Eventually, David and Bathsheba were comforted by the birth of another son whom they called Solomon, "the peaceful," but to whom Nathan the prophet, blessing him in the name of G‑d, gave besides, another name, Jedidiah, "the beloved of G‑d."
Capture of Rabbah
For more than a year the siege of Rabbah had been continued, when finally David marched forth from Jerusalem with a large army and fought against Rabbah and stormed it. The great stronghold of the Ammonites fell, and the Ammonites were completely subdued.