Treaty of Fontainebleau
Spain declared war on Britain in December 1804; Portugal remained neutral until Spain and France signed the 1807 Treaty of Fontainebleau dividing Portugal between them. The Treaties of Badajoz and Madrid contained clauses making them void if any of the terms were breached; Portugal declared Fontainebleau constituted such a breach.