Answer:
In 1808, Spain's problems were compounded when Napoleon Bonaparte's troops entered the Iberian Peninsula. Initially Spain was an ally of France and Napoleon sought co-operation from Spain for his invasion of Portugal. However Napoleon betrayed Spain and French troops also occupied Spanish territory.