MEXICO CITY — A political neophyte best known for playing dimwitted characters on his television comedy show won Guatemala’s presidential election on Sunday as voters overwhelmingly turned their backs on the status quo.

The former comedian, Jimmy Morales, led with 67.4 percent of the vote against Sandra Torres, a former first lady known for her social programs, with almost 96 percent of the vote counted. But almost half of eligible voters did not cast ballots, an even stronger message of disgust with the country’s politics as usual. The election capped six tumultuous months in which a rising anticorruption citizens’ movement helped bring down a president.

In a short televised announcement, Mr. Morales, 46, declared victory Sunday night. “With this vote you made me president,” he said. “I have received a mandate, and the mandate of the people of Guatemala is to fight against the corruption that has consumed us.”

Running on the slogan “Not corrupt, nor a thief,” Mr. Morales capitalized on his image as a political outsider, setting himself apart from an establishment tainted by corruption.