CARACAS, Venezuela (CNN) -- Venezuelan President Hugo Chavez was re-elected Sunday to a new six-year term, overcoming an energetic challenge by a candidate backed by an opposition coalition, according to nearly complete results announced by election officials.
Chavez, who has been president since 1999, defeated Henrique Capriles Radonski, whose campaign criticized the Chavez administration for inefficiencies, infrastructure shortcomings and corruption.
Fireworks began to pepper the sky over Caracas soon after the provisional results were announced.
"Today we have demonstrated -- comrades, compatriots -- that our democracy is one of the best in the world," Chavez said in a speech from the balcony of the presidential palace to thousands of supporters who cheered and waved flags.
He thanked those who had voted for him and acknowledged those who had voted against him, applauding their "democratic attitude."
Chavez has had more than a decade to implement his vision of 21st century socialism, a view that emphasizes use of state oil windfalls to fund social programs. During his campaign, he highlighted his accomplishments in housing, education and health initiatives and acknowledged he need to do more on crime and government bureaucracy.
The ebullient leader is 58 years old and has been visibly weakened by two surgeries for cancer. He has kept secret his kind of cancer and prognosis.
His victory gives him "the opportunity to consolidate his policies" and also reaffirms the approach his government has taken to international relations, said Miguel Tinker Salas, a Latin American history professor at Pomona College in California.
Chavez's influence over Latin America's left-leaning governments has often rankled the United States, Venezuela's largest trading partner. Venezuela is the fourth-largest exporter of oil to the United States.
Despite that tight economic relationship, the two countries are far from close allies: Chavez often rails against the United States and its allies as "imperialists" and has supported controversial world leaders like President Mahmoud Ahmadinejad of Iran.
The election result Sunday means the U.S. government will have to continue to deal with Chavez's provocatively independent brand of diplomacy.
"I think Washington will have to start getting used to the fact that countries in Latin America, especially South America, are charting their own course," said Salas.
With 90 percent of the ballots counted Sunday night, Chavez has 54.42% of the vote compared with 44.97 percent for Capriles, according to Tibisay Lucena, president of the National Electoral Council.
Chavez had secured 7.4 million votes and Capriles 6.1 million votes, election officials said.
In a speech to his supporters, Capriles congratulated Chavez on his victory and urged him to take into account the different views expressed by voters.
"Being a good president means working for the vision of all Venezuelans," he said.
Observers had said Capriles, 40, represented a moderate alternative to Chavez, the charismatic standard-bearer of the Latin American left. Capriles had vowed not to end the social programs that Chavez had set up, and he had promised to fight corruption that had grown in the public sector.
Capriles is a high-profile conservative who was a mayor, a parliament member and governor of Miranda, which adjoins the nation's capital. The attorney-turned-politician had been so active on the campaign trial that he earned the nicknamed the "roadrunner."
He appeared to have mounted one of the strongest challenges so far in Chavez's 13 years in power. But his efforts ultimately proved insufficient to unseat the incumbent.
The opposition will now have to try to maintain a unified front for regional elections scheduled to take place December, Tinker Salas said. That may prove difficult, he said, since "the one thing that brought them together was the figure of Chavez."
The country saw one of its high participation rates in decades on Sunday, with almost 81 percent of voters going to the polls, according to Lucena of the electoral council.
In fact, some polls were kept open two hours after their scheduled closing because of lines of voters waited for ballots.
The army was deployed around the country throughout the day to ensure a peaceful and secure vote, said Maj. Gen. Wilmer Barrientos, commander of strategic operations command.
Nearly 140,000 troops were deployed throughout the country to guard polls and keep the peace, state-run VTV reported.
In a phone call aired on state-run television earlier in the evening, Chavez had asked people to remain calm until the election results were completed and for there to be no violence.
Long lines began forming in the early morning hours at polling stations from remote regions of the Amazon to the bustling capital of Caracas.
By mid-afternoon, Barrientos reported 15 electoral offenses throughout the entire country, the Venezuelan military said on its Twitter account. No further details were immediately available.
The election also drew voters from beyond the country's borders as thousands of Venezuelans living abroad lined up to cast their ballots at diplomatic offices.
In New Orleans, Louisiana, voters streamed into the Venezuelan Consulate. Many traveled by bus from Miami, where Venezuelan authorities closed a consulate in January after the United States expelled the office's top Venezuelan diplomat.
In Caracas, voters said they were happy to be casting their ballots.
"I'm really proud of the people, because everyone is cheerful about this event and I think there is a good feeling," said Jesus Betancourt, a 25-year-old student.
Standing outside the Caracas school where Chavez cast his ballot, Katherene Rivas said she hoped Venezuelans would respect the results.
"For now, everything is quiet here, and we want that after the results are announced, that people remain calm," she said.
Journalist Osmary Hernandez and CNN's Mariano Castillo, Paula Newton, Gustavo Valdes, Helena DeMoura, Patricia Janiot, Rafael Romo, Michael Martinez, Jethro Mullen and Richard Singer contributed to this report.
™ & © 2012 Cable News Network, Inc., a Time Warner Company. All rights reserved.