In around 1210 B.C., the New Kingdom of Egypt shipped large amounts of grains to the then disintegrating Hittite Empire, meaning there had been a food shortage in Anatolia but not the Nile Valley. But this soon changed. Although Egypt managed to decisively deliver a final defeat to the Sea Peoples at the Battle of Xois, Egypt itself went into steep decline. The collapse of all the other societies of the Eastern Mediterranean disrupted established trade routes and caused widespread economic depression. Government workers went underpaid, which resulted in the first labor dispute in recorded history and undermined royal authority. There was also political infighting between different factions of government. Bad harvest due to reduced flooding at the Nile led to a major famine. Food prices rose up to eight times their normal values, and occasionally even reached twenty-four. Runaway inflation followed. Attacks by the Libyans and Nubians made things even worse. Thus through the course of its rule the Twentieth Dynasty (∼1187–1064 B.C) saw Egypt devolving from a major power in the Mediterranean into a deeply divided and weakened state that later came to be ruled by the Libyans and the Nubians.