The war began when French and Spanish armies crossed Spain and invaded Portugal in 1807, and in 1808 France turned on its ally, Spain.
The war began. French and Spanish armies crossed Spain. French and Spanish armies invaded Portugal in 1807. France turned on its ally. This was in 1808. Its ally was Spain.