It said Mr Sanchez Ceren won 50.11% of the votes in the 9 March poll, defeating conservative candidate Norman Quijano, who polled 49.89%.

Mr Quijano had challenged the result, alleging fraud.

But the court's decision makes Mr Sanchez Ceren the country's first ex-rebel to serve as president.

On Sunday, the court said that there was not enough evidence to back Mr Quijano's claim.

"Based on the results, Salvador Sanchez Ceren and Oscar Samuel Ortiz are declared president and vice-president elect respectively, for the period from 1 June 2014 to 1 June 2019," court president Eugenio Chicas was quoted as saying by Reuters.

The country's outgoing President Mauricio Funes said he would meet Mr Sanchez Ceren later on Monday to begin the handover process.

Mr Sanchez Ceren became vice-president of El Salvador in 2009, while Mr Quijano was the mayor of the capital, San Salvador.