The 1820 Battle of Cepeda, fought between the Centralists and the Federalists, resulted in the ''end of the Supreme Director rule''. In 1826 Buenos Aires enacted another centralist constitution, with Bernardino Rivadavia being appointed as the first president of the country. However, the interior provinces soon rose against him, forced his resignation and discarded the constitution. Centralists and Federalists resumed the civil war; the latter prevailed and formed the Argentine Confederation in 1831, led by Juan Manuel de Rosas. During his regime he faced a French blockade (1838–1840), the War of the Confederation (1836–1839), and a combined Anglo-French blockade (1845–1850), but remained undefeated and prevented further loss of national territory. His trade restriction policies, however, angered the interior provinces and in 1852 Justo José de Urquiza, another powerful caudillo, beat him out of power. As new president of the Confederation, Urquiza enacted the liberal and federal 1853 Constitution. Buenos Aires seceded but was forced back into the Confederation after being defeated in the 1859 Battle of Cepeda.