Getty

A man walks past a mural portraying the Venezuelan flag, President Hugo Chavez and South American liberator Simon Bolivar at the 23 de Enero neighbourhood, in Caracas on March 5, 2013. Getty

Venezuelan President Hugo Chavez lost his battle with cancer Tuesday, silencing the leading voice of the Latin American left and plunging his divided oil-rich nation into an uncertain future.

Vice President Nicolas Maduro, who struggled to hold back tears as he announced Chavez's death, said the government had deployed the armed forces and police "to accompany and protect our people and guarantee the peace."

Chavez had named Maduro as his heir, but the Venezuelan opposition is sure to press for fresh elections and tensions have been mounting over government allegations that its domestic rivals are in league with its foreign foes.

PHOTOS: Unpresidential Moments in Presidential History

Shortly before Chavez's death was announced, Maduro and other top officials had accused Venezuela's enemies of somehow giving the 58-year-old leftist the cancer that eventually killed him, and two US military attaches were expelled.

Under the constitution, elections must be held within 30 days and National Assembly speaker Diosdado Cabello must take over on an interim basis, but Chavez had urged Venezuelans to vote for Maduro if he was unable to return.

Soldiers brought the Venezuelan flag down to half-staff at the Caracas military hospital, where senior figures in Chavez's 14-year-old administration gathered before the cameras of state television to break the news.

"We have received the toughest and tragic information that... comandante President Hugo Chavez died today at 4:25 pm," Maduro said.

"Long live Chavez!" the officials shouted at the end of his announcement.

NEWS: Despite the Gray Hair, Presidents Live Longer

Chavez had been checked into the hospital on February 18 for a course of chemotherapy after spending two months in Cuba, where in December he had undergone his fourth round of cancer surgery since June 2011.

The once ubiquitous symbol of Latin America's "anti-imperialist" left had disappeared from public view after he was flown to Cuba on December 10, an unprecedented absence from the public eye that fueled all manner of rumors.

The government sent mixed signals about the president's health for weeks, warning one day that he was battling for his life, yet insisting as recently as last weekend that he was still in charge and giving orders.

And the opposition repeatedly accused the government of lying about the president's condition.

A man walks past a mural portraying the Venezuelan flag, President Hugo Chavez and South American liberator Simon Bolivar at the 23 de Enero neighbourhood, in Caracas on March 5, 2013. Getty

Chavez will be mourned by many of the country's poor, who revered the self-styled revolutionary for using the country's oil riches to fund popular housing, health, food and education programs.

And like-minded Latin American leaders like Cuba's Raul Castro, Ecuador's Rafael Correa and Bolivia's Evo Morales lost a close friend who used his diplomatic muscle and cheap oil to shore up their rule.

Chavez died five months after winning an October election, overcoming a resurgent opposition and public frustration over a rising murder rate, regular blackouts and soaring inflation.

He missed his swearing-in for a new six-year term on January 10, but the Supreme Court approved an indefinite delay.

NEWS: Randomly Selected Leaders May Make Politics More Efficient

A new election could offer another shot at the presidency to Henrique Capriles, the opposition leader who lost to Chavez in October.

Until picking Maduro, 50, as his political heir, Chavez had never allowed other leaders to emerge within his United Socialist Party of Venezuela (PSUV).

He used the ballot box to consolidate his power and push through policies that drove a wedge into Venezuelan society, alienating the wealthy with expropriations while wooing the poor with social handouts.

NEWS: Venezuela Bans Shark Finning

Chavez won re-election vowing to make his self-styled 21st century "Bolivarian" revolution "irreversible."

Defense Minister Diego Molero, surrounded by top military officers, said Tuesday that the armed forces would defend the constitution and respect Chavez's wishes.

The opposition had accused Chavez of misusing public funds for his campaign and dominating the airwaves while forcing government workers to attend rallies through intimidation.

His death will particularly affect Cuba's communist regime, whose moribund state-run economy has relied heavily on Chavez's oil generosity.

Under Fidel Castro's mentoring, Chavez became the face of the radical left in Latin America, with regular diatribes against US "imperialism" and the forging of ties with regimes at odds with Washington in Syria, Libya and Iran.

But despite tense relations with the United States, Chavez continued to export one million barrels of oil per day up north.

A man walks past a mural portraying the Venezuelan flag, President Hugo Chavez and South American liberator Simon Bolivar at the 23 de Enero neighbourhood, in Caracas on March 5, 2013. Getty

Before cancer slowed him down, Chavez was known for rousing speeches peppered with religious references, songs and quotes from South American independence hero Simon Bolivar.

The then lieutenant colonel gate-crashed the political scene in 1992 when he led a failed coup against president Carlos Andres Perez.

After two years in prison, he decided to take power through democratic elections, winning in 1998 to become Venezuela's youngest president at age 44.

After reforming the constitution to increase presidential terms to six years and reducing the powers of Congress, he easily won the 2000 election.

Chavez survived a short-lived coup in 2002 that lasted just 47 hours after popular protests restored him to power. A 2004 attempt by the opposition to oust him in a recall referendum was defeated.

Elected to a second six-year term in 2006, Chavez then won a 2009 referendum that abolished the two-term limit and enabled him to run indefinitely.

Now, for the first time in 14 years, Venezuelans will not see his name on the next election's ballot.