After the loss of the First Republic of Venezuela, Bolívar had gone to New Granada where he joined the army of the United Provinces, which was in the process of fighting with cities that did not recognize its authority. On January 28, 1813 Bolívar captured Ocaña, a city which was on the main roads to Venezuela. The expedition was formed by two divisions, a vanguard led by Colonel Atanasio Girardot and a rear under Colonel José Félix Ribas.