After Vienna was recaptured by imperial forces, General Windischgrätz and 70,000 troops were sent to Hungary to crush the Hungarian revolution and as they advanced the Hungarian government evacuated Pest. However the Austrian army had to retreat after heavy defeats in the Spring Campaign of the Hungarian Army from March to May 1849. Instead of pursuing the Austrian army, the Hungarians stopped to retake the Fort of Buda and prepared defenses.