The Ammonites were closely related in biblical tradition to Israel through Lot. Deuteronomy 2:19 records God's command that Israel not attack or seize the land of the Ammonites because their territory had been given to the descendants of Lot.
Relations later became hostile. Judges 10-11 describes Ammonite oppression and Jephthah's war against them. During the monarchy, Saul, David, and later kings of Judah encountered Ammonite rulers and armies. David's war with Rabbah forms the political background of the account involving Uriah and Bathsheba in 2 Samuel 11-12.
The prophets also addressed Ammon, condemning violence and hostility toward Israel while announcing judgment and, in some passages, eventual restoration.