 Complete the following phrase:  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 