The first fort was erected on today’s Buda Castle Hill by the king of Hungary in the 13th century, in the wake of the Mongol invasion. A spectacular Gothic-style palace would be erected by the subsequent Anjou kings to serve as a permanent home for the royal court, making Buda the quasi-capital of medieval Hungary. King Matthias turned the place into what might have been the first Italian Renaissance-style royal palace in Europe, bringing about a true Golden Age for Buda Castle. The palace was a bustling intellectual centre, hosting the finest European scientists and artists, as well as the Bibliotheca Corvina, the renowned library of King Matthias I. The architectural inspiration probably came from the concurrent reconstruction of the Palazzo Vecchio in Florence.