Lack of support from the local population meant the Allies entered an almost deserted Madrid and were effectively isolated when Portuguese forces were prevented from crossing into Spain. In November, the Allies left Madrid for Catalonia in separate detachments, one of 5,000 under Stanhope and the second of 12,000 under the Austrian Starhemberg. Stanhope's division was taken by surprise and forced to surrender by a French army led by Louis Joseph, Duke of Vendôme at Brihuega on 9 December 1710. The next day Vendôme followed this up by defeating Starhemberg at Villaviciosa; these defeats were a devastating setback to Allied ambitions in Spain. Although Allied forces continued to operate out of Catalonia, British commitment to the war was already waning under the new Tory government and Stanhope's replacement as British commander in Spain the Duke of Argyll took no offensive action.