In order to ruin the British economy, Napoleon set up the Continental System in 1807, and tried to prevent merchants across Europe from trading with Britain. The large amount of smuggling frustrated Napoleon, and did more harm to his economy than to his enemies'. thumb|The height of the First Empire. Freed from his obligation in the east, Napoleon then went back to the west, as the French Empire was still at war with Britain. Only two countries remained neutral in the war: Sweden and Portugal, and Napoleon then looked toward the latter. In the Treaty of Fontainebleau (1807), a Franco-Spanish alliance against Portugal was sealed as Spain eyed Portuguese territories. French armies entered Spain in order to attack Portugal, but then seized Spanish fortresses and took over the kingdom by surprise. Joseph Bonaparte, Napoleon's brother, was made King of Spain after Charles IV abdicated.
In order to ruin the British economy, Napoleon set up the Continental System in 1807, and tried to prevent merchants across Europe from trading with Britain. The large amount of smuggling frustrated Napoleon, and did more harm to his economy than to his enemies'. thumb|The height of the First Empire. Freed from his obligation in the east, Napoleon then went back to the west, as the French Empire was still at war with Britain. Only two countries remained neutral in the war: Sweden and Portugal, and Napoleon then looked toward the latter. In the Treaty of Fontainebleau (1807), a Franco-Spanish alliance against Portugal was sealed as Spain eyed Portuguese territories. French armies entered Spain in order to attack Portugal, but then seized Spanish fortresses and took over the kingdom by surprise. Joseph Bonaparte, Napoleon's brother was made King of Spain after Charles IV abdicated.