The status quo did not last for long. In mid-1815 a large Spanish expeditionary force under Pablo Morillo had arrived in New Granada. Morillo retook Cartagena and by mid-1816 had conquered Bogotá and returned all of New Granada to royalist control. Bolívar reinvaded, defeating the royalists at Boyacá. The republicans of New Granada and Venezuela came together to form Gran Colombia as a united front against the royalists. In 1821 the Gran Colombian army won a decisive victory at the Battle of Carabobo, with the last royalist strongholds falling within two years. A Spanish fleet sent in 1823 was defeated at the Battle of Lake Maracaibo, marking the end of the war for independence in the north.