Juan José Rafael Teodomiro de O'Donojú y O'Ryan (Spanish pronunciation: [ˈxwan de oˌðonoˈxuj ˌoˈraʝan] ⓘ, 30 July 1762 – 8 October 1821) was a Spanish-Irish military officer, diplomat and Viceroy of New Spain (Mexico) from 21 July 1821 to 28 September 1821 during the Mexican War of Independence.
[2][3] Prior to the birth of O'Donojú, both of his paternal and maternal families had immigrated to Spain in the 1720s, fleeing the anti-Catholic Penal Laws which had been instituted in the Kingdom of Ireland by the Protestant Ascendancy.
O'Donoju was the chief of staff to General Gregorio García de la Cuesta during the Battle of Talavera (27 and 28 July 1809).
On 11 July 1809, O'Donojú served as an interpreter between Cuesta and the British commander, Lieutenant-General Sir Arthur Wellesley (later created, in May 1814, The 1st Duke of Wellington), as the two met to make their campaign plans.
At the time O'Donojú left for New Spain, the Cortes was considering to greatly expand the autonomy granted to the overseas Spanish possessions according to the restored constitution.
His appointment to the viceregality has been attributed to the influence of the Mexican deputies then representing New Spain in the Cortes in accordance with the Constitution of 1812.
The Spanish governor of Veracruz, Jose Dávila did not agree with such arrangements and resolved to retreat to the fortress of San Juan de Ulúa to hold his ground.
[10] O'Donojú entered Mexico City on the afternoon of September 26, and dined with the Ayuntamiento before housing himself at the Casa de Moncada.
On September 28 he presented himself at the main hall of the palace to install the provisional governmental junta, and he signed the act of independence.