The 1703 campaign was marred by Allied conflicts over strategy; they failed to take Antwerp, and the Dutch narrowly escaped disaster at Ekeren in June, which led to bitter recriminations. On the Upper Rhine, Imperial forces under Louis of Baden remained on the defensive, although they took Landau in 1702. Throughout 1703, French victories at Friedlingen, Höchstädt and Speyerbach with the capture of Kehl, Breisach and Landau directly threatened Vienna. In 1704, Franco-Bavarian forces continued their advance with the Austrians struggling to suppress Rákóczi's revolt in Hungary. To relieve the pressure, Marlborough marched up the Rhine, joined forces with Louis of Baden and Prince Eugene, and crossed the Danube on 2 July. Allied victory at Blenheim on 13 August forced Bavaria out of the war and the Treaty of Ilbersheim placed it under Austrian rule. Allied efforts to exploit their victory in 1705 foundered on poor co-ordination, tactical disputes and command rivalries, while the ruthless rule of Leopold's successor Joseph in Bavaria caused a brief but vicious peasant revolt. In May 1706, an Allied force under Marlborough shattered a French army at the Battle of Ramillies and the Spanish Netherlands fell to the Allies in under two weeks. France assumed a defensive posture for the rest of the war; despite the loss of strongpoints like Lille, they prevented the Allies from making a decisive breach in their frontiers. By 1712, the overall position remained largely unchanged from 1706. Spain and Portugal British involvement was driven by safeguarding their trade routes in the Mediterranean. By putting Charles VI on the Spanish throne, they also hoped to gain commercial privileges within the Spanish Empire. The Habsburgs viewed Northern Italy, as well as suppressing the Hungarian revolt, as higher priorities, while, after 1704, the Dutch focused on Flanders. As a result, this theatre was largely dependent on British naval and military support; high casualties from disease made it a heavy drain on resources for little apparent benefit. Spain was a union between the Crowns of Castile and Aragon, which was divided into the Principality of Catalonia, plus the Kingdoms of Aragon, Valencia, Majorca, Sicily, Naples and Sardinia. In 1701, Majorca, Naples, Sicily, and Sardinia declared for Philip, while a mixture of anti-Castilian and anti-French sentiment meant the others supported Archduke Charles, the most important being Catalonia. Allied victory at Vigo Bay in October 1702 persuaded Peter II of Portugal to switch sides, giving