 When the French forces were recalled in 1706, he accompanied the duke to Paris, where he was favourably received by Louis XIV.Alberoni accompanied Vendôme to Spain as his secretary and became very active in promoting the cause of the French candidate Philip V. Following Vendôme's death, in 1713 he was made a Count and appointed Consular agent for Parma at Philip's court where he was a Royal favourite.Under the terms of the 1713 Treaty of Utrecht, Philip became King of Spain but the Spanish Empire was effectively partitioned.