CARACAS — President Hugo Chavez, long a fiery foe of Washington, won reelection Sunday, facing down cancer and the strongest electoral challenge of his nearly 14 years in office and gaining a new mandate to deepen his socialist revolution.
Though his margin of victory was much narrower than in past elections, he still won handily. With 90 percent of the votes tallied, Chavez received 54 percent, to 45 percent for his opponent, Henrique Capriles Radonski, the national election commission said. Fireworks erupted in Caracas after the news, and Chavez supporters celebrated in the streets.
Still, after a spirited campaign, the polarizing Chavez finds himself governing a changed country. He is an ailing and politically weakened winner facing an emboldened opposition that grew stronger and more confident as the voting neared, and at times seemed to have an upset victory within reach.
Chavez has said that he would move forward even more aggressively to create his version of socialism in Venezuela in a new six-year term, although his pledges were short on specifics.
His health, though, remains a question mark. He has undergone several rounds of treatment for cancer in the last fifteen months, but has refused to make public essential details of his illness. If he overcomes the disease and serves out his new term to its end in 2019, he will have been in power for two full decades.
Toward the end of the campaign, facing pressure from Capriles, he pledged to make his government more efficient and to pay more attention to the quality of government programs like education. He even made appeals for the middle class and the opposition to join in his revolution.
But Chavez spent much of the year insulting and trying to provoke Capriles and his followers. And Sunday night, he had to face the fact that the people he taunted as squalid good-for-nothings, little Yankees and fascists, turned out to represent nearly half the electorate.
Capriles was subdued Sunday night, congratulating Chavez and saying he hoped the president would see the result as “the expression today of a country with two visions, and to be president means working to solve the problems of all Venezuelans.”
He appeared poised to carry on his fight in the elections for state governors in December.
“You should all feel proud, do not feel defeated,’’ he told supporters.
Michael Shifter, president of the Inter-American Dialogue, a research institute in Washington, called the presidential election ‘‘a fundamental turning point.’’ He said Chavez was ‘‘going to have to deal with a very different society than he dealt with in his last term, a society that’s awakened and more organized and more confident.”
Even so, there are risks for the opposition, a fragile coalition with a history of destructive infighting, especially after an election defeat. Capriles will have to keep this fractious amalgam of parties from the left, right, and center together in order to take advantage of the new ground they have gained.
“The opposition has more power, it feels more support,’’ said Elsi Fernandes, a schoolteacher, who voted for Capriles Sunday morning in Catia, a poor neighborhood in Caracas. ‘‘The difference is that we’re not going to stay with our arms crossed.’’
The voter turnout was more than 80 percent, the highest in decades, the election commission said. People stood in line for hours, although the voting appeared in most cases to run smoothly.
Chavez dismissed Capriles as an unworthy opponent, called him names like little Yankee and fascist, and accused him of lying about wanting to continue Chavez’s social programs.
Many people, though, said they were simply ready for a change.
“This government has had 14 years in power,’’ said Alvaro Hernandez, 19, a student, before voting in central Caracas. ‘‘How much more does it need? It’s going to be more of the same. Too much crime, unemployment, lack of housing.’’
But in Catia, Maria Elena Severine, 59, who works as a cleaner in a bank, said that Chavez was still as fresh a candidate as when he first ran in 1998.
“I like my president,” she said. “He is the revolution. He is change.”