On 8 June 1867, Franz Joseph and Elisabeth were ceremoniously crowned king and queen of Hungary. With this event, it became necessary to extend Buda Castle in Budapest, since it would again henceforth serve as seat of government for a Hungarian royal couple.
Work on the castle began in 1875 and was intended primarily to enable the accommodation of a substantial administrative apparatus required as a result of the Compromise. In order to harmonize the alteration work with the expansions to the palace under Maria Theresia in around 1760, the part of the building constructed at that time was copied and set against the original like a mirror image. Architect Miklós Ybl was in charge of the work, a representative of European historicism who also designed the Budapest Opera House. Following his death in 1891, Alajos Hauszmann took over direction of the works on the castle and shaped its neo-Baroque appearance.
As king of Hungary, Franz Joseph spent several weeks each year in Budapest, always wearing Hungarian uniform and conducting his business in the Hungarian language. While Hungary was thus independent as a state, the other nationalities under the Monarchy striving for independence were refused such recognition. This imbalance led increasingly to unrest and tensions within the Monarchy. Hungary took advantage of the Compromise to implement far-reaching reforms which, besides liberalization, also brought with them strong elements of nationalization.
As a sign of her affinity with the Hungarian nation, Elisabeth gave birth to her last child, Marie Valerie, in Budapest. It was not by chance that the baby of the family, born ten years after her brother Rudolf, was given the sobriquet ‘the Hungarian child’. Elisabeth spoke predominantly Hungarian with her daughter, and spent a great deal of time with her in Buda and at the summer residence of Gödöllö Palace. In 1908, while Franz Joseph was still alive, as an expression of the great reverence which Elisabeth (Hungarian: Erzsebet) enjoyed in Hungary, a Queen Elisabeth Memorial Museum was opened in the wing of the castle which she had inhabited. This is no longer in existence today, and its holdings are largely to be found in the collections of the Hungarian National Museum.
The last Austrian emperor, Karl I, was also crowned as king of Hungary, Karol VI, in Budapest in 1916, and kept this status until his formal withdrawal from participation in affairs of state in November 1918. Karl made two failed attempts in 1921 to regain the Hungarian throne from exile.
When the damage caused to the castle building during the Second World War was repaired, its stately appearance from the first half of the twentieth century was considerably simplified.