The Junta took over direction of the Spanish war effort and established war taxes, organized an Army of La Mancha, signed a treaty of alliance with Britain on 14 January 1809 and issued a royal decree on 22 May to convene at Cortes. An attempt by the Spanish Army of the center to recapture Madrid ended with the complete destruction of the Spanish forces at Uclés on 13 January by Victor's I Corps. The French lost 200 men while their Spanish opponents lost 6,887. King Joseph made a triumphant entry into Madrid after the battle. Sébastiani defeated Cartaojal's army at Ciudad Real on 27 March, inflicting 2,000 casualties and suffering negligible losses. Victor invaded southern Spain and routed Gregorio de la Cuesta's army at Medellín near Badajoz on 28 March. Cuesta lost 10,000 men in a staggering defeat, while the French lost only 1,000.