Venezuelan President Hugo Chavez, 58, has died after battling cancer for several months, bringing an end to a 14-year period of rule that began in 1999.

Chavez had undergone four cancer operations in Cuba and had not been seen in public since arly December. He died in a military hospital in the Venezuelan capital Caracas.

Vice-president Nicolas Maduro, who is likely to be Chavez's successor, announced the news of his death in an emotional address, saying: "We have just received the most tragic and awful information.

"At 4:25pm, President Hugo Chávez Frias died. It's a moment of deep pain. Commander, thank you so much, on behalf of these people whom you protected."

A seven-day period of mourning has been announced in the country. Maduro will become interim president until the next elections, which will be held within 30 days.

Scores of grief-stricken Chavez supporters flooded the streets chanting "Chavez lives! The revolution continues" and "We are all Chavez!" They also sang a popular folk song: "Those who die for life cannot be called dead."

The Venezuelan military has pledged to remain loyal to the constitution and urged the people to maintain calm.

Chavez's body will be kept in Caracas until the state funeral on Friday, which is expected to be attended by millions of people, including socialists from around the world.

The serious nature of Chavez's health condition came to light in June 2011 when he disclosed that Cuban surgeons had removed a tumour from his pelvis.

Several world leaders have offered their condolences following the death of the socialist leader.

The White House said: "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.

"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."

Foreign Secretary William Hague said he is "saddened" by the death of Chavez and remarked that he has left a "lasting impression" on Venezuela.

Bolivian President Evo Morales, who is on his way to Caracas, said he is "destroyed" to learn about the death. He said: "It hurts, but we must stand united in this process of liberation, not only of Venezuela but of the whole region. Chavez is now more alive than ever."