José Miguel de Carvajal-Vargas, 2nd Duke of San Carlos

José Miguel de Carvajal-Vargas y Manrique de Lara Polanco, 2nd Duke of San Carlos, (8 May 1771 in Lima, Peru – 27 September 1828 in París), 6th conde de Castillejo and 9th conde del Puerto was an Absolutist military and noble. A favourite of Ferdinand VII of Spain, he became his Mayordomo mayor and Secretario de Estado (Prime minister).

Biography
Born in Lima, Peru, in 1771, he was the son of Mariano Joaquín de Carvajal-Vargas y Brun, 6th Count of Castillejo, and Maria Manrique de Lara Polanco y Carrillo, daughter of the 2nd Marquis of Lara. His paternal grandfather was Fermín Francisco de Carvajal-Vargas, hereditary Correo Mayor de Indias (Postmaster General of Indies) who was created Duke of San Carlos and Grandee of Spain by Charles III in 1780.

At a young age, he was made Count of Puerto (his father renounced the title in his favour) and a Knight of the Order of Santiago. He started his military career in the Spanish Army in Peru having been appointed colonel of the Regiment of Infantry of Caraz when he was fifteen years old. He then studied philosophy and mathematics at the University of San Marcos in Lima where he obtained a licenciate and a master of arts degree in 1788.

This last year, Carvajal Vargas established himself in Madrid. He was successively promoted to colonel in 1793, brigadier in 1794, field marshal in 1795 and lieutenant general in 1802. In 1796, his father died so when his grandfather died next year he succeeded him as Duke of San Carlos. Next year, he married Rosario de Silva y Fernández de Miranda, 7th Countess of Fuenclara.

A close friend of Fernando, Prince of Asturias, when Mariano Luis de Urquijo came to power San Carlos was appointed ayo of both the Prince of Asturias and his brother Infante Carlos Maria Isidro. Considering that San Carlos and the Prince's tutor Canon Escoiquiz were influencing Fernando against him and the favourite Manuel Godoy, Charles IV removed San Carlos from his post in 1802. Briefly, he served as mayordomo mayor of Queen Maria Luisa.

Once the Prince of Asturias married Princess Maria Antonia of Naples, a party called Napolitan was formed in the court decisively active against Godoy. An open war between the Princes and the favourite started and in 1805 Godoy accused the Princess of Asturias of tried to murder the king and he himself. That same year, Charles IV appointed San Carlos Mayordomo Mayor of the king, the highest position in court, in an effort to get closer to his son.

In 1808, he participated actively in the Tumult of Aranjuez, which removed Manuel Godoy and King Charles IV of Spain from power, and installed Ferdinand as new King of Spain. When Napoleon forced Ferdinand to abdicate, the Duke of San Carlos followed Ferdinand into exile. The former king was confined at the Chateau de Valencay, private residence of Napoleon's minister of Foreign Affairs Charles-Maurice de Talleyrand, and San Carlos initially accompanied him there. However, he was soon confined at Lons-le-Saunier in eastern France after the imperial police informed Napoleon he had become a lover of Talleyrand's wife.

In 1813, San Carlos returned from his exile with the decline of Napoleon's power. He drafted and negotiated the Treaty of Valençay with France, which recognized Ferdinand VII as legitimate king of Spain and the restitution of the occupied territories. Appointed special envoy to Madrid, San Carlos negotiated with the Council of Regency the terms of the return of the Bourbon king.

After the Absolutist Restauration under King Fernando VII of Spain in 1814, he became Secretary of State (Prime Minister of Spain) between May and November 1814.

Later, he was Spanish ambassador or envoy in Saint-Petersburg, Paris, Vienna, Lisbon and London (1817-1820), Knight in the Order of the Golden Fleece (1814), Knight of the Military Order of Alcantara and other knighthoods in France, Naples, Prussia, Hungary, and Russia.

He was also the director of the Royal Spanish Academy from 1814 to 1828, three times Mayordomo mayor to the King, Captain general of the Army (1827-1828) and Director of the problematic Banco de San Carlos, founded in 1782 by the French – Spanish financier Francisco Cabarrus.

Marriage and children
He married twice : first with María del Rosario de Silva, Countess of Fuenclara, Duchess of Arenberg, First Class Grandee of Spain, from whose marriage he had no children. After her death in 1802, he married the next year María Eulalia de Queralt y Silva (1787-1863), daughter of the Counts of Santa Coloma, Grandee of Spain and niece of his previous wife.

From this marriage he had 6 children, including :
 * José Fernando de Carvajal-Vargas y Queralt (1808-1872), III Duke of San Carlos and heir to all his father's titles.
 * Maria Luisa (1804-1843), married in Bordeaux, France in 1821, Vicente Osorio de Moscoso, 13th Count of Altamira, (1801–1864), and holder of 14 Grandees of Spain.