This celebration did not almost turn into a catastrophe. It contributed to one of the greatest disasters in history.
In 1258, the Mongol forces began to march towards Baghdad. The city was home to the Abbasid Caliph and the jewel of the Islamic world. Caliph Al-Musta'sim made a grave mistake not taking the threat seriously enough. He did not even summon all of the armies that he could have. His city would pay the price of his incompetence.
Soon the Mongol forces arrived close to the city. Caliph Al-Musta'sim sent out a cavalry force of 20,000 to face off against the Mongols. The Abbasid cavalry army defeated the Mongol vanguard. However instead of returning to safety inside of the city, the army decided to camp by the Tigris River. Here they celebrated their victory and held a feast. Unfortunately for them, this celebration would result in their deaths.
The next morning, the main Mongol force arrived. It trapped them and prevented them from returning to the city. The Abbasid army was now trapped between the Mongol army and the Tigris river. This cavalry force was easily destroyed by the Mongols. This left the city of Baghdad even weaker than before. They had just lost a significant part of their defensive force. What little chance the people of Baghdad had died with their cavalry force.
About a month later, the defenses of Baghdad fell. The Mongols took the city. The people were massacred and taken as slaves. The books were thrown into the river. The city was plundered and burnt down. Caliph Al-Musta'sim was rolled into a carpet and trampled to death by a stampede of horses.