In 1713 he arranged the marriage of the Duke of Parma’s niece Elizabeth Farnese with Philip V of Spain. He became effective ruler of Spain in 1715 and strengthened royal power in Spain at the expense of the nobles. His chief aims were to strengthen Spain, nullify the Peace of Utrecht, and crush Habsburg power in Italy. He was doubtful about the wisdom of declaring war on Austria in July 1717 and it proved to be a disastrous decision, mainly because of British and French intervention against Spain, and resulted in his dismissal by Philip in 1719. He retired to Rome.