Spain entered the American Revolutionary War as an ally of the United States and France in June 1779. From September 1779 to May 1781, Bernardo de Galvez led an army in a campaign along the Gulf Coast against the British. Galvez's army consisted of Spanish regulars from throughout Latin America and a militia which consisted of mostly Acadians along with Creoles, Germans, and Native Americans. Galvez's army engaged and defeated the British in battles fought at Manchac and Baton Rouge, Louisiana, Natchez, Mississippi, Mobile, Alabama, and Pensacola, Florida. The loss of Mobile and Pensacola left the British with no bases along the Gulf Coast. In 1782, forces under Galvez's overall command captured the British naval base at Nassau on New Providence Island in the Bahamas. Galvez was angry that the operation had proceeded against his orders to cancel, and ordered the arrest and imprisonment of Francisco de Miranda, aide-de-camp of Juan Manuel Cajigal, the commander of the expedition. Miranda later ascribed this action on the part of Galvez to jealousy of Cajigal's success.