In 1824, Greater Mayorship of Sonsonate and Intendance of San Salvador were united forming the state of El Salvador, together with United Provinces of Central America . According to the federal law the governors received the title of Supreme Head until 1841, when El Salvador declares independent being its denominated governors presidents