Guerra de las Naranjas
In 1799, John became Prince regent for his mother, who had been declared unable to reign, owing to her mental illness. At the same time, Napoleon Bonaparte had taken control of France through his coup-d'etat, the 18 Brumaire. Spain and France would soon sign a treaty and declare war and attempt to invade Portugal, starting the War of the Oranges. While peace was eventually attained, Portugal and its empire suffered territorial losses.