This article needs additional citations for verification. (May 2009) ( Learn how and when to remove this template message)
When Spain entered the War in 1779, Bernardo de Gálvez, the energetic governor of Spanish Louisiana, immediately began offensive operations to gain control of British West Florida beginning with his assault at Fort Bute. In September 1779 he gained complete control over the lower Mississippi River by capturing Fort Bute and then shortly thereafter obtaining the surrender of the remaining forces following the Battle of Baton Rouge. He followed up these successes with the capture of Mobile on March 14, 1780, after a brief siege.
Gálvez began planning an assault on Pensacola, West Florida's capital, using forces from Havana, with the recently captured Mobile as the launching point for the attack. British reinforcements arriving in Pensacola in April 1780 delayed the expedition, however, and when an invasion fleet finally sailed in October, it was dispersed by a hurricane a few days later. Gálvez spent nearly a month regrouping the fleet at Havana. 
Following the outbreak of hostilities with Spain 1779, General John Campbell, concerned over the condition of the defenses, requested reinforcements, and began construction of additional defenses. By early 1781, the Pensacola garrison consisted of the 16th Regiment, a battalion from the 60th, and 7 (Johnstones) Company of the 4th Battalion Royal Artillery (Present day 20 Battery Royal Artillery, 16 Regiment Royal Artillery). These were augmented by the Third Regiment of Waldeck and The Maryland Loyalist Battalion, as well as the Pennsylvania Loyalists. These troops were provincial soldiers, rather than militia.
In addition to the Loyalist soldiers, many Native Americans supported the British. After the fall of Mobile in March 1780, between 1,500-2,000 Indians had come at various points to Pensacola to join in its defense. These included Choctaws and Creeks, with Creeks being the most numerous. Just before the Spanish attack only 800 Native American warriors remained in Pensacola, as Campbell, not realizing the attack was imminent, had sent about 300 away. During the siege and battle there were ultimately only about 500 natives left at Pensacola, due to diplomatic efforts of the Muscogee Creeks to take a more "balanced" role by offering supplies to both sides and diminishing their role on the British side. The majority of the Native Americans still present during the siege were Choctaw. 
Gálvez had received detailed descriptions of the state of the defenses in 1779, when he sent an aide there ostensibly to discuss the return of escaped slaves, although Campbell had made numerous changes since then. Pensacola's defensive works in early 1781 consisted of Fort George, an earthen works topped by a palisade that was rebuilt under Campbell's directions in 1780. North of the fort he had built the Prince of Wales Redoubt, and to its northwest was the Queen's Redoubt, also built in 1780.  Campbell erected a battery called Fort Barrancas Colorada near the mouth of the bay.
Gálvez embarked his flag with the Spanish fleet, under the command of Captain José Calvo de Irazabal. With about 1,300 men, the regular troops included a Majorcan regiment and Arturo O'Neill (later Governor of Spanish West and East Florida) commanding 319 men of Spain's Irish Hibernia Regiment, and including militias of biracial and free Afro-Cubans.  Gálvez had also ordered additional troops from New Orleans and Mobile to assist.
The Spanish expeditionary force sailed from Havana on February 13. Arriving outside Pensacola Bay on March 9, Gálvez landed some troops on Santa Rosa Island, the barrier island protecting the bay. O'Neill's Hibernians landed at the island battery, which he found undefended, and landed artillery, which he used to drive away the British ships taking shelter in the bay.
However, bringing the Spanish ships into the bay turned out to be difficult, just as it had been the previous year at the capture of Mobile. Supplies were offloaded onto Santa Rosa Island to raise the draft of some of the ships, but Calvo, the fleet commander, refused to send any more ships through the channel after the lead ship, the 64-cannon San Ramon, grounded in its attempt. Furthermore, some British guns seemed to have the range to fire on the bay's entrance. 
Gálvez used his authority as Governor of Louisiana to commandeer the ships that were from Louisiana. He boarded the Gálveztown, and on March 18 he sailed her through the channel and into the bay. The three other Louisiana ships followed him, under what proved to be ineffective British artillery fire. After sending Calvo a detailed description of the channel, his captains all insisted on making the crossing, which they did the next day. Calvo, claiming that his assignment to deliver Gálvez' invasion force was now complete, sailed back to Havana in the San Ramon. 
On March 24, the Spanish army and its accompany militia moved to the center of operations. O’Neill served as aide-decamp and commander of the scout patrols. Once the bay had been entered, O’Neill’s scouts landed on the mainland and blunted an attack by 400 mainly pro-British Choctaw Indians on the afternoon of March 28. The scouts soon joined forces with the Spanish troops arriving from Mobile.
During the first weeks of April, O'Neill's Irish scouts reconnoitered the Pensacola fortifications. The redoubt farthest from the city was the Crescent. Next distant was the Sombrero, followed by Fort George. The Spanish troops established encampments and began extensive preparations for a siege. Hundreds of engineers and laborers brought supplies and armaments to the battlefield.  The engineers also dug trenches, and built bunkers and redoubts, besides constructing a covered road to shield the troops from the constant fire of grapeshot, grenades, and cannonballs.  On April 12, Gálvez himself was wounded while viewing the British fortifications. Battlefield command was formally transferred to Colonel José de Ezpeleta, a personal friend of Gálvez. 
A second attack by the Choctaws began on April 19, interrupting the siege preparations, and that day a large fleet was sighted heading towards the bay. Although at first thought to be bringing British reinforcements, the ships turned out to be the combined Spanish and French fleet from Havana commanded by José Solano y Bote and François Aymar, the Baron de Monteil, having on board Spanish Field Marshal Juan Manuel de Cagigal. Reports of a British squadron sighted near Cape San Antonio had reached Havana, and reinforcements had been sent to Gálvez. The Spanish ships carried a total of 1,700 sailors and 1,600 soldiers, bringing the total Spanish force at Pensacola to an unstoppable 8,000 men.  Solano decided to remain to assist Gálvez after the disembarkation of the troops, and the two men worked closely together.
On April 24, a third Choctaw attack caught the Spanish napping. Five Spanish were wounded, including O’Neill’s cousin, Sublieutenant Felipe O’Reilly. Two days later, soldiers from the Queens Redoubt attacked Spanish positions, but were driven back by O’Neill’s scouts. On April 30, the Spanish batteries opened fire, signalling the start of the full-scale attack on Pensacola. However, the Gulf was now experiencing tempestuous storms, and a hurricane struck the Spanish ships on May 5 and 6. The Spanish fleet had to be withdrawn, for fear the seas would wreck the ships on the shore. The army remained to continue the siege, even though the trenches were flooded. Gálvez issued them a daily ration of brandy to keep up their spirits. 
In early May, Gálvez was surprised to receive chiefs of the Tallapoosa Creeks, who came offering to supply the Spanish army with meat. Gálvez arranged the purchase of beef cattle from them, and also requested that they appeal to the British-allied Creeks and Choctaws to cease their attacks. On May 8, a howitzer shell struck the magazine in Fort Crescent, exploding it and sending black smoke billowing. Fifty-seven British troops were killed by the devastating blast, and Ezpeleta quickly led the light infantry in a charge to take the stricken fort. The Spanish moved howitzers and cannons into what remained of it and opened fire on the next two British forts. Pensacola's defenders returned fired from Fort George, but were soon overwhelmed by the massive Spanish firepower.
Two days later, realizing his final line of fortification could not survive the barrage, General John Campbell reluctantly surrendered Fort George and Prince of Wales Redoubt. The garrison raised a white flag over Fort George at 3 in the afternoon of May 10, 1781. More than 1,100 British and colonial troops were taken prisoner, and 200 casualties were sustained. The Spanish army lost 74 dead, with another 198 wounded. 
Gálvez personally accepted the surrender, ending British sovereignty in West Florida. The Spanish fleet left Pensacola for Havana on June 1 to prepare assaults on the remaining British possessions in the Caribbean. Gálvez appointed O'Neill the Spanish Governor of West Florida, and his Hibernia Regiment departed with the fleet.
The terms of capitulation included the entirety of British West Florida, the British garrison, large quantities of war material and supplies, and one British sloop of war.  Gálvez had the batteries and Fort Barrancas Coloradas moved nearer to the bay's entrance, and placed a battery on Santa Rosa Island against British attempts to recapture Pensacola.
The Tallapoosa Muscogee Creek mission during the siege was probably connected with or even ordered by Alexander McGillivray, a mixed-race Creek trader. Although he was a Loyalist and held a British commission as a colonel, he was a longtime opponent of American colonial intrusions on Creek land. Raised as a Creek, though well educated in South Carolina, McGillivray was viewed by many Creeks a their leader. He supplied the British in Pensacola, and had organized the British Muskogee Creek contingents who fought alongside the Choctaws. He would become principal Chief of the Upper Creeks in 1783, who lived on the Tallapoosa River at Little Tallassee (near today's Montgomery, Alabama). His support for Spain later resulted in the 1784 Treaty of Pensacola, in which Spain guaranteed to respect Creek territory. McGillivray personally negotiated the treaty and spent the rest of his life in Pensacola.
The Spanish fleet took the British prisoners to Havana, from which they were sent to New York in a prisoner exchange, which angered the rebellious Americans. However, such exchanges were routine, and Gálvez arranged the exchange to free Spanish soldiers and seamen from the brutal conditions on British prison ships.
Gálvez and his army were welcomed as heroes on their arrival in Havana on May 30. King Charles III promoted Gálvez to lieutenant general,  and he was made governor of both West Florida and Louisiana. The royal commendation stated that as Gálvez alone forced the entrance to the Bay, he could place on his coat of arms the words Yo Solo. 
José Solano y Bote was later recognized by King Charles III for coming to aid Gálvez with the title Marques del Socorro. A painting of Solano now hanging in the Museo Naval de Madrid shows him with Santa Rosa Bay in the background. A British flag captured at Pensacola is displayed at the Spanish Army Museum in Toledo.
- Marley p 333
- Mays p 250
- Chartrand 54
- Chávez, 2003: 194
- Bense (1999), p. 36
- O'Brien, Greg (30 April 2008). Pre-removal Choctaw history: exploring new paths. University of Oklahoma Press. pp. 124–125. ISBN 978-0-8061-3916-6. Retrieved 25 March 2011.
- Kaufmann (2004), p. 131
- Kuethe pp. 41-42
- Dupuy (1977), p. 151
- Gálvez p. 26
- Gálvez p. 20
- Martín-Merás p. 82
- Martín-Merás, p. 85
- Mitchell p. 104
- Caughey pp. 209-211
- This was the 18-gun HMS Port Royal. The 18-gun sloop HMS Mentor, the former Maryland privateer Who's Afraid, which the British had captured in 1779 off the Bahamas, had wrecked in March. Her crew had burnt her to prevent her capture.
- Caughey p. 214
- Bense, Judith Ann (1999). Archaeology of colonial Pensacola. Gainesville, FL: University Press of Florida. ISBN 978-0-8130-1661-0. OCLC 40444062.
- Caughey, John W. (1998). Bernardo de Gálvez in Louisiana 1776-1783. Gretna: Pelican Publishing Company. ISBN 1-56554-517-6.
- Chartrand, René (2006). The Spanish Main 1492–1800. Osprey Publishing. ISBN 978-1846030055.
- Chávez, Thomas E (2003). Spain and the Independence of the United States: An Intrinsic Gift. University of New Mexico Press. ISBN 9780826327949.
- Davis Paul K. Besieged: 100 great sieges from Jericho to Sarajevo, Oxford University Press, USA ISBN 0-19-521930-9
- Dupuy, R. Ernest; Hammerman, Gay; Hayes, Grace P (1977). The American Revolution: A Global War. New York: David McKay. ISBN 0-679-50648-9.
- Gálvez, Bernardo (1781). Diario de las operaciones de la expedicion contra la Plaza de Panzacola concluida por las Armas de S. M. Católica, baxo las órdenes del mariscal de campo. Mexico.
- Kaufmann, J. E.; Idzikowski, Tomasz (2004). Fortress America: the forts that defended America, 1600 to the present. Cambridge, MA: Da Capo Press. ISBN 978-0-306-81294-1. OCLC 56912995.
- Kuethe, Allan J. (1986). Cuba, 1753-1815: Crown, Military, and Society. Knoxville: The University of Tennessee Press. ISBN 0-87049-487-2.
- Marley, David F (2005). Historic Cities of the Americas: An Illustrated Encyclopedia. ABC-CLIO. ISBN 978-1-57607-027-7.
- Mays, Terry M (2009). Historical Dictionary of the American Revolution Volume 39 of Historical Dictionaries of War, Revolution, and Civil Unrest. Scarecrow Press. ISBN 9780810875036.
- Martín-Merás, Luisa (2007). "The Capture of Pensacola through Maps, 1781" in Legacy: Spain and the United States in the Age of Independence, 1763-1848. Washington, DC: Smithsonian Institution. ISBN 978-84-95146-36-6.
- Mississippi Valley Historical Association (1915). Proceedings of the Mississippi Valley Historical Association, Volume 8. Cedar Rapids, IA: Torch Press. OCLC 1644027.
- Mitchell, Barbara (Autumn 2010). "America's Spanish Savior: Bernardo de Gálvez marches to rescue the colonies". MHQ: The Quarterly Journal of Military History: 98–104.
- Reparaz, Carmen (1986). Yo Solo : Bernardo de Gálvez y la toma de Panzacola en 1781. Barcelona: Ediciones del Serval S.A. ISBN 84-7628-012-2.
- Revolutionary War: Pensacola, Florida
- Revolutionary War: Siege of Pensacola
- Spain and Hispanic Americans in the American Revolutionary War