Gerardo Barrios was President of El Salvador, from 12 March 1859 to 26 October 1863. Barrios was a liberal and supported the unity of Central America. He was, from a young age, part of the army of the last president of Federation of Central American Estates, Francisco Morazan. After his death he became the leader or the unionist movement. He served as president of El Salvador several times - in 1858 in acting capacity, from 1859 to 1860 in acting capacity and again from 1860 to 1863. He was known for his concern for international relations and is attributed for introducing coffee production to El Salvador, accelerating the spread through Central America. Coffee became the basis of El Salvador's economy. Between 1860 and 1863, Barrios launched a reorganization of the public finances and promoted the coffee production and silk-elaboration related activities. He also created a professional armed force, and favored non-religious public education. In his first years of government he looked for a pacific convivance with Guatemala, which made him visit that country in 1860. However, conflicts were not absent, especially with the church. One of the first incidents was the expulsion of three Capuchin friars. In 1860, conflicts escalated when the clerk represented by bishop Tomás Pineda y Zaldaña, denied to accept the Constitution on the Republic, claiming that none of the priests were committed to obey the government, because the only authority above all earth is God, the bishop and the Pope. Conservatives felt outraged by Barrios, claiming he was anti-clerical, despotic and liberal. Many conservatives, including bishop Pineda y Zaldaña, had to look for shelter in Guatemala and from there they launched a newspaper campaign against the Salvadoran government. In 1861 attacks were strong, and even worse, a confrontational climate began to grow between the two countries. Particularly because of Guatemala's President aspirations to become the controller of Central America. In 1863, after a few border skirmishes El Salvador declared war on Guatemala, and on June 19 Guatemalan troops began invading El Salvador. On October 26, after a long siege, Carrera took over San Salvador, taking full control of the city. The same year Barrios escaped to San Miguel. With Carrera's approval, Francisco Dueñas installed himself as a president and won the 1865 elections. As a constitutional president, he promoted a trial against Barrios, who was captured in Nicaragua on July 27 and extradited to El Salvador the same week. The court martial began on August 10, and he was sentenced to death on August 28; the execution took place the following day. In 1910 he was officially granted a title of 'national hero' for his heroic efforts to protect the rights of the farming communities as well as leading his military triumphs to protect Central America from foreign invasions. His name has been honored by naming national institutions, two cities, and a major street after him, as well as having his life taught at schools.