His government had many problems, primarily an ongoing war with Brazil over territory in modern Uruguay and resistance from provincial authorities. Faced with the rising power of the Federalist Party and with several provinces in open revolt, Rivadavia submitted his resignation on June 27, 1827. He was succeeded by Vicente López y Planes. At first he returned to private life, but fled to exile in Europe in 1829.