In 1705, she returned to Spain with a free hand, and with what was practically the power to name her own ministry. During the worst times of the War of the Spanish Succession, she was the real head of the Bourbon party and was well aided by Princess Maria Luisa of Savoy, the spirited young queen of Philip V. She did not hesitate to quarrel even with so powerful a personage as Cardinal Luis de Portocarrero, Archbishop of Toledo, when he proved hostile. Yet she was so far from offending the pride of the nation that, when in 1709 Louis XIV, severely pressed by the other Great Powers, threatened or pretended to desert the cause of his grandson, she dismissed all Frenchmen from the court and threw the king on the support of the Castilians.