The war ended with no major territorial gains or losses for either side, and the two alliances were at war again by 1701. Despite initial French successes at Friedlingen and Hochstadt, the allied armies under the Duke of Marlborough and Prince Eugene of Savoy inflicted major defeats on French troops at Blenheim, Ramillies, and Oudenarde. In Spain (the succession to that nation's throne was the war's cause), Spanish forces allied to the French lost Gibraltar. However, after the disastrous Battle of Malplaquet in 1709, Marlborough's reputation was tarnished and, after gossip at the English (now British, after the union of England and Scotland) court, he was eventually relieved from command. France's fortune returned under the leadership of Marshal Villars and Marshal Vendôme but despite a major victory at Denain in 1712, the war had turned into a stalemate and ended in a treaty that somewhat favored the French in 1714.