Ferdinand III and also became sovereign King of Hungary and Bohemia. As his wife, she received the titles of Holy Roman Empress and sovereign Queen. Her coronation as Queen of Hungary took place in Pressburg during the Hungarian Diet of 1637–1638. Maria Anna, being active in politics as the adviser of her spouse, was an important mediator between the Emperor and their Spanish relatives. Despite the fact that she always defended the interests of her husband, she did not forget the interests of her brothers King Philip IV and the Cardinal-Infante. In her court, which was consisted mainly of Spaniards, frequent guests were the Spanish ambassador and diplomats. The Emperor, during his absences from the Imperial court in Vienna, appointed his wife as regent, for example in 1645 during the Thirty Years' War, when he was in the Kingdom of Bohemia. Death In March 1645 Maria Anna and her children left Linz, due to the approach of the Protestant Swedish army, and moved to Vienna. By April it was ready to cross the Danube there and threatened to occupy the city. The Imperial family fled instead temporarily to Graz. After returning to Vienna, they were forced to move again to Linz because of the plague. The Empress' sixth pregnancy became known in January 1646; four months later, on 12 May at Linz Castle, Maria Anna suddenly felt ill with fever and heavy bleeding and died the next morning. Her unborn child, a girl, was taken out alive from her womb. She was named Maria after her mother, but only lived a few hours. On 24 May both mother and daughter in the same coffin were moved to Vienna and buried in the Imperial Crypt, which already contained the coffins with the remains of the two sons of the Empress who died earlier. The funeral cortege was accompanied by the Spanish ambassador and the Empress' maid of honor. Very upset by the death of his wife and child, the Emperor was unable to attend the funeral. However, after returning to Vienna in late August he finally paid his respects to the remains of Maria Anna, and in September he announced the engagement of their eldest daughter Maria Anna with Balthasar Charles, Prince of Asturias. However, the Prince died the following month shortly after the announcement. The Spaniards courtiers members of the late Empress' household who came with her from Spain, including