However, the discovery in December 1718 of a Spanish-backed conspiracy to replace Orléans as Regent allowed him to position his response as an attack on Alberoni, not Philip, and France declared war on 2 January 1719. Austrian forces in Sicily had mixed success but without control of the sea, Spanish defeat was inevitable. An attempt to divert British resources with the 1719 Jacobite Rising failed, while the Capture of Vigo in October showed how vulnerable the Spanish coastline was to the Royal Navy. Philip dismissed Alberoni in December 1719 and agreed to end the war.