Eugenio Chicas, the president of the Supreme Electoral Tribunal confirmed a razor-thin election win by Sanchez Ceren over Norman Quijano of the conservative ARENA party who had challenged the results.
Sanchez Ceren, 69, of the Farabundo Marti National Liberation Front (FMLN), is set to be sworn in for his five-year term on June 1, Chicas said at a press conference.
The final results - 50.11 against 49.89 - were announced on Thursday following a partial recount, and are identical to a preliminary result announced immediately after the vote.
The president-elect served as vice president under President Mauricio Funes, who came to office in 2009 at the head of El Salvador's first leftist government, ending two decades of right-wing rule, mostly under ARENA.
More From This Section
Sanchez Ceren, a former teacher, was one of the top military rebel commanders during El Salvador's bitter 1979-1992 civil war. He also served as education minister.
After the rebels laid down their arms, the FMLN became a legal political party.
Quijano, 67, is mayor of the capital San Salvador.