The Castilla Real affair was a diplomatic incident in July of 1839 in the territory disputed between the nascent Republic of Texas and the Empire of Mexico. While out patrolling, a small group of Texian soldiers came upon a Mexican garrison at the fort of Castilla Real. Due to lingual barriers and confusion in the dark, a Mexican warning shot fired was viewed by the Texians as an attack, and they promptly fired back. One Mexican was killed, and in the ensuing Mexican volley two Texians were injured.
Despite being a simple misunderstanding, the event occurred at an escalating time of tension known as the Annexation Crisis, with Texas and the United States openly accepting overtures of annexation in the Treaty of Velasco. While a diplomatic solution was being sought, the Castilla Real incident led to the withdrawal of Mexican negotiators from Texas, and the injured Texians - Robert Mount and Tom Johnson - were captured and brought to Mexico City, where they were tried as enemies of the state and promptly hanged publicly with Prime Minister Antonio Lopez de Santa Anna and Emperor Agustin I in attendance. The Texian and American ambassadors were promptly withdrawn, and weeks later Santa Anna issued an ultimatum demanding the United States disavow the Treaty of Velasco and withdraw all soldiers from Texas. American refusal to comply as such and their inability to withdraw soldiers from Texas, as they had none posted there, led to Santa Anna's declaration of war against Texas on September 14, 1839 and his subsequent crossing of the Rio Grande.