The battle of Medina was fought on August 18, 1813, between the republican forces of the Gutiérrez-Magee expedition under Gen. José Álvarez de Toledo y Dubois and a Spanish royalist army under Gen. Joaquín de Arredondo. This bloodiest battle ever fought on Texas soil took place twenty miles south of San Antonio in a sandy oak forest region then called el encinal de Medina. Occurring during a very confused and turbulent period of world history, the battle of Medina affected the destinies of Spain, Mexico, the United States, England, and France. Mexico and Latin America were in revolt against Spain, whose king was Joseph Bonaparte, brother of Napoleon, who was on a rampage in Europe, and the United States was at war with England, later to be called the War of 1812. In this cauldron of world events, José Bernardo Gutiérrez de Lara and Augustus William Magee, abetted by the United States, organized an expedition to wrest Texas from Spain. Adopting a "Green Flag" for a banner, their Republican Army of the North crossed from the Neutral Ground in Louisiana into Texas on August 7, 1812, and soon captured Nacogdoches, Trinidad de Salcedo, La Bahía, where Magee died, and San Antonio, where a declaration of independence for the State of Texas under the Republic of Mexico was proclaimed on April 6, 1813. This, however, was short-lived, for Joaquín de Arredondo, commandant-general of the Provincias Internas, organized an army of 1,830 men and marched them early in August from Laredo toward San Antonio to quell the rebellion. In the meantime, Toledo deposed Gutiérrez and became the new commander of the republicans on August 4.
With a force of about 1,400 men composed of Anglos, Tejanos, Indians, and former royalists, Toledo, urged by Tejanos who wanted to spare San Antonio from the ravages of battle, chose to meet the enemy south of the city. The night of August 17 he encamped his forces about six miles from Arredondo's camp between the Atascosa and Medina rivers and planned to ambush the royalists as they traveled through a defile along the Laredo road. The next morning, however, royalist scouts flushed the republicans and lured them into an ambush in a dense oak forest. Acting against Toledo's orders, the republicans, led by Miguel Menchaca, trudged through deep sand for several hours in pursuit of a cavalry unit, which they mistook for an army. In the meantime, Arredondo prepared breastworks on favorable ground and ordered his men not to fire on the rebels until they were within forty paces. By the time the republicans came within range, they were very hot, thirsty, and tired. After a furious four-hour battle involving infantry, cavalry, and artillery, the republicans broke ranks and ran. Most of those not killed on the battlefield were caught and executed during the retreat. The republicans were decimated. Less than 100 were able to escape alive. Of these, no more than twenty have thus far been identified. Arredondo lost only fifty-five men, who were given honorable burial the next day on the way to San Antonio, where he established martial law and severely punished the rebels and their families. One of Arredondo's more notable subalterns was Lt. Antonio López de Santa Anna, who learned the lessons of war well and returned to Texas with another army twenty-three years later.
The bodies of the republican warriors lost in battle were left to lie nine years on the battlefield until 1822 when José Félix Trespalacios, the first governor of the state of Texas under the newly established Republic of Mexico, ordered a detachment of soldiers to gather their bones and bury them honorably under an oak tree that grew on the battlefield. A Texas counterpart to the Mexican War of Independence, the Gutiérrez-Magee expedition of 1812–13 came literally to a dead end at the battle of Medina. So disastrous was la batalla del encinal de Medina that its battlefield has become lost, its "Green Flag" has remained largely unrecognized, and its participants have been generally unknown, unhonored, and unsung. It is noteworthy, however, that some of its participants were sons of American revolutionaries, some fought later with Andrew Jackson in the War of 1812, and some fought again during the second Texas Revolution in 1835–36. In the 2010s, based on archival records and maps, as well as various artifacts found by landowners, the Medina battlefield and burial sites were estimated to be in northern Atascosa County and near old Pleasanton Road.