Joshua 8:1qum
Now the Lord said to Joshua, "Do not fear or be dismayed. Take all the people of war with you and arise, go up to Ai; see, I have given into your hand the king of Ai, his people, his city, and his land.
The Lord encourages Joshua and promises to give Ai into his hand.
Joshua 10:1Ay
Now it came about when Adoni-zedek king of Jerusalem heard that Joshua had captured Ai, and had utterly destroyed it (just as he had done to Jericho and its king, so he had done to Ai and its king), and that the inhabitants of Gibeon had made peace with Israel and were within their land,
News of Ai's fall makes the king of Jerusalem afraid.
Jeremiah 49:3Ay
"Wail, O Heshbon, for Ai has been destroyed! Cry out, O daughters of Rabbah, Gird yourselves with sackcloth and lament, And rush back and forth inside the walls; For Malcam will go into exile Together with his priests and his princes.
A different Ai, an Ammonite city, mourned in prophecy.