Venezuelan President Hugo Chavez has died after a two-year battle with cancer, ending the socialist leader's 14-year rule of the South American country.

The 58-year-old leader had undergone four operations in Cuba for a cancer that was first detected in his pelvic region in mid-2011.

His last surgery was on 11 December and he had not been seen in public since.

"We have just received the most tragic and awful information.

"At 4.25 pm (8.55pm Irish time) today March the 5th, President Hugo Chavez Frias died," Vice President Nicolas Maduro announced in a televised address, his voice choking.

"It's a moment of deep pain," he said in the address, in which he appeared with senior ministers.

Mr Chavez easily won a new six-year term at an election in October and his death will devastate millions of supporters who adored his charismatic style, anti-US rhetoric and oil-financed policies that brought subsidised food and free health clinics to long-neglected slums.

Detractors, however, saw his one-man style, nationalisations and often harsh treatment of opponents as evidence of an egotistical dictator whose misplaced statist economics wasted a historic bonanza of oil revenues.

His death paves the way for a new election that will test whether his socialist "revolution" can live on without his dominant personality at the helm.

The vote should be held within 30 days and will likely pit Mr Maduro against Henrique Capriles, the centrist opposition leader and state governor who lost to Mr Chavez in the October election.

One recent opinion poll gave Mr Maduro a strong lead.

Mr Maduro is Mr Chavez's preferred successor and enjoys support among many of the working class and could benefit from an inevitable surge of emotion in the coming days.

A defeat for Mr Maduro would bring major changes to Venezuela and could also upend its alliances with Latin American countries that have relied on Mr Chavez's oil-funded largesse - most notably with communist-led Cuba, which recovered from financial ruin in the 1990s thanks largely to Mr Chavez's aid.

Mr Capriles called for unity among Venezuelans and offered condolences to Mr Chavez's family and supporters.

"At such a difficult time, we must show our deep love and respect to our Venezuela," he tweeted. "My solidarity to all the family and followers of President Hugo Chavez. We appeal for unity among Venezuelans at this time."

In an address to the nation earlier this evening, Mr Maduro repeated a charge first made by Mr Chavez himself - that the cancer was an "attack" by his enemies in the United States and by Venezuela's opposition.

A US diplomat had been expelled for plotting against the government, amid an upsurge of conspiracies and sabotage attempts against the Venezuelan government, Mr Maduro said.

Born to a poor family on 28 July 1954, Mr Chavez aspired to be a painter and then a professional baseball player in the US Major Leagues.

A former lieutenant colonel, he spent much of his military career conspiring with other leftist soldiers to overthrow the traditional political order.

He led a 1992 coup against then-president Carlos Andres Perez that failed but launched his political career.

After being pardoned, Mr Chavez toured the country before winning a 1998 election. For many poor voters, he symbolised a fresh start after decades of governments widely seen as self-serving and corrupt.

In 2002, a group of opposition politicians and dissident troops staged a coup. Mr Chavez was arrested and flown to a military base on a Caribbean island.

Two days later, loyal military officers and protests by supporters swept him back to power, where he later accused the United States of being behind the coup and said he feared he was about to be killed.

Mr Chavez adopted a deliberately populist style, using colourful and strong language that drew on the macho culture of the "llanos" of his youth, and the barracks of his military career.

He was married twice and has three daughters and a son. He and his second wife, a journalist and politician, divorced in 2000.

President Michael D Higgins said: "I was very sorry to hear of the death, after a long illness, of President Hugo Chavez of Venezuela.

"President Chavez achieved a great deal during his term in office, particularly in the area of social development and poverty reduction.

"I extend my sincere condolences to the family of President Chavez on their great loss. My thoughts and best wishes are also with the people of Venezuela as they come to terms with this sad news".

US President Barack Obama said the United States is interested in starting a new relationship with Venezuela after the death of Mr Chavez.

"At this challenging time of President Hugo Chavez's passing, the United States reaffirms its support for the Venezuelan people and its interest in developing a constructive relationship with the Venezuelan government," Mr Obama said.

"As Venezuela begins a new chapter in its history, the United States remains committed to policies that promote democratic principles, the rule of law, and respect for human rights," he said.

UN Secretary-General Ban Ki-moon offered his "deepest condolences" to the people of Venezuela, while Russia's UN ambassador Vitaly Churkin told reporters: "It's a tragedy. He was a great politician."