Carlos Salazar Castro (1800 in San Salvador, El Salvador - July 23, 1867 in San José, Costa Rica) was a Central American military officer and Liberal politician. Briefly in 1834 he was provisional president of El Salvador, and in 1839 he was provisional president of Guatemala.
He was born in 1800 in El Salvador to Gregorio Salazar and Francisca Castro y Lara. His father was interim president of the Federal Republic of Central America from September 16, 1834 to February 14, 1835.
Salazar was sent at age 12 to Guatemala to study humanities at the Colegio Tridentino. He graduated from secondary school in 1817 and returned to El Salvador, where he dedicated himself to commerce and to tending the estates of his family. He also joined the independence movement. He was a deputy to the local congress in 1822.
He fought alongside Liberal General Francisco Morazán in the Central American civil wars, becoming his lieutenant in 1832, in the deposition of the Salvadoran head of state, José María Cornejo. From June 23, 1834 to July 13, 1834 Salazar served as provisional head of state of El Salvador. On the latter date, the federal government took over direct control of the state, and Salazar's father, Gregorio Salazar, became acting chief of state.
General Salazar (the son) again fought at the side of his friend and ally General Morazán in 1837, against the movement known as "The Moderates" (Los Moderados). He was decorated for his performance in this campaign. In 1839 he was the hero of the Battle of Villa Nueva (near Guatemala City), where Morazán's Liberals defeated the Conservatives under Rafael Carrera and forced a (temporary) treaty of peace with him.
He was secretary of the interior of the State of Guatemala in 1839 when the Liberals named him provisional president of the state to replace Mariano Rivera Paz. Salazar served in this capacity from January 30, 1839 to April 13, 1839, when Rivera returned to office. Carrera soon renewed the civil war.
With the fall of General Morazán's federal regime in 1840, Salazar accompanied him to Costa Rica on Morazán's way into exile. Salazar stayed in Costa Rica when Morazán went to Colombia, and retired from politics. He opened a business in San José, and lived there until his death on July 23, 1867. In El Salvador he has been designated Benemérito de la Patria. El Salvador repatriated his remains, which are now buried in a cemetery in San Salvador.