The Fall of Ashdod refers to the successful Egyptian assault on the city of Ashdod in Palestine in c. 635 BC. According to the Greek historian Herodotus, pharaoh Psamtik I, besieged Ashdod for 29 years. Ashdod had lost most of its inhabitants during those long years of siege.
Prior to the death of Ashurbanipal sometime in 627 BC, the Assyrian Empire was engaged in almost constant warfare on multiple fronts, with nomadic tribesmen from the south, Chaldeans initiating uprisings, Elamites supporting such rebellions and Egyptians inciting further rebellion in the Levant. In the face of these multiple threats the Assyrians under Ashurbanipal campaigned aggressively. Despite success, the Assyrians lost too many soldiers through years of deteriorating warfare. In an effort to increase Assyria's standing in the East, Ashurbanipal abandoned Egypt and concentrated on Elam. However, this left Egypt more or less unchecked, although it appears that Assyrian rule, at least at the de jure level, continued until 639 BC.
Despite the previous hostility between the two powers, it appears that the Assyrians and the Egyptians did not go to war. Indeed as late as 605 BC, the Egyptians were actively aiding the Assyrians in an attempt to help them survive. Moreover, the Ethiopian / Nubian rulers of Egypt were driven out by the native Coptic Egyptians sometime in circa 650; therefore the Assyrians and the native Egyptians made natural allies against Nubian domination. The capture of Ashdod may have been effectively reflect part of the transfer of power from the crumbling Assyrian Empire to the new Egyptian 26th Dynasty.