At the end of the 18th century, Portugal joined in the Revolutionary Wars, when it sent an expeditionary army to aid Spain against the Revolutionary French in the War of the Pyrenees (Roussillon campaign). However, Spain made a separate peace with France and turned itself against Portugal. In 1801, the Spanish Army invaded Portugal with the aid of France, with the Portuguese Army facing the invaders in the War of Oranges. The refusal from Portugal to antagonize Britain, its old ally, and to adhere to the Continental System, led to the start of the Peninsular War, with the French Army invading Portugal in 1807. The French invasion obliged the strategic transference of the Portuguese Crown to Brazil and put the Portuguese Army in disarray. Under French occupation, the Army was disbanded and its most important units were integrated into the Portuguese Legion raised by order of Napoleon, that would fight for him in the campaigns of Germany, Austria and Russia. Reconstituted and integrated into the Anglo-Portuguese Army, led by the British General Arthur Wellesley, the Portuguese Army performed well in the remainder of the Peninsular War. The first major battle of the Anglo-Portuguese Army was the Battle of Bussaco in 1810, the success of which gave the inexperienced Portuguese troops confidence in their abilities. The infantry and artillery went on to perform well up until the final Battle of Toulouse in 1814 when news arrived of Napoleon's abdication.