The Revolution of 1848 and the Siege of 1849
The castle was one of the most important scenes of the Hungarian War of Independence on the 15th of March 1848, although this was not thanks to its own citizens. The crowd demanding civil rights and national autonomy marched from Pest - where the demonstration began - to the government offices. They wanted the Council of the Royal Governor to immediately satisfy their two demands: to abolish censorship of the press and to release the political prisoners. As the frightened government agreed to fulfil the demands, the unarmed crowd left the castle in a triumphal march, taking with them the only prisoner of the József barracks, Mihály Táncsics - who had been imprisoned because of his seditious books.
The revolution was a bloodless success, and the demands for social reform and for national autonomy were satisfied. Modern parliamentary system was established in Hungary. The castle retained its role as the centre of government in the new system. Ministries led by the most important Hungarian politicians of the 19th century were moved to sites previously occupied by the Council of the Royal Governor and the Royal Chamber. Lajos Kossuth's Ministry of Finance, Ferenc Deák's Ministry of Justice and József Eötvös's Ministries of Religion and Education operated in the castle.
However, from the autumn of 1848 the fruits of the revolution had to be protected by force of arms from the Viennese court, which sought to undermine them. The war went on with alternating success. Initially the imperial forces gained the upper hand: in the first days of 1849 the Hungarian government and parliament were forced to leave the capital. Imperial forces marched into Buda.
When a turn for the better came, in May 1849, a successful Hungarian offensive made the recapture of Buda possible. When the Hungarian army approached from the east, the imperial forces, fearing encirclement, evacuated Pest at the end of April. But in Buda, the guards of the castle, under the command of General Heinrich Hentzi, decided to defend the castle to the very last.
Political reasons, rather than military ones led to the recapture of the fortress, which in itself was not significant from a military point of view. The government believed that the recapture of the capital was the precondition of the acceptance of the sovereign Hungarian state in Europe.
When the troops arrived it turned out that the castle had been fortified in every possible place during the previous months, and it had been stocked with strategic arms and food, while its commander, Major General Hentzi planned to defend it with his army of 4,700 Italian, Croatian and Polish soldiers. Laying siege to the undamaged castle would have been a pointless task, so plans were made to continually fire on the Castle from the neighbouring hills. Until the 16th of May, when their heavy cannons were due to arrive, the besiegers planned to wear down the defenders' resistance with continuous cannon fire, diversionary night attacks and the burning of some buildings in the castle (the majority of the royal palace was destroyed by fire).
On the 16th of May the heavy cannons positioned on Naphegy (Sun Hill) started to create a gap in the castle wall, south of the Fehérvári Gate. When the gap was wide enough to pass through, on the 21st of May at 3 a.m. a general attack was launched from every direction. Despite the desperate efforts of the defenders, the Hungarian army was unstoppable and by 7 o'clock Hungarian flags were flying on every bastion. Some 4,000 defenders were taken prisoner. Among the dead were Major General Hentzi, who had been shot, and Colonel Allnoch, who blew himself up with the mines placed on the Chain Bridge (this only inflicted minor damage to the bridge).
The parade held on the second day after the victory was performed in front of the ruins. The whole roof of the palace had burnt down, the palatine's residences in the southern wing were burnt out, and the outhouses (stables, coach-houses, and the guards' building) on the western side of Szent György tér lay in ruins. But the greatest loss was the 17 officers and 351 common soldiers, who were buried on the same day in the cemetery of the Tabán.