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

File photo of Venezuela's President Hugo Chavez taking part in an ecumenic ceremony for his health and cancer treatment in CaracasReuters
A Peruvian supporter of Venezuelan President Hugo Chavez writes a message in a book of condolences inside Venezuela's embassy in LimaReuters
Supporters of Venezuela's President Hugo Chavez react to the announcement of his death in CaracasReuters
A supporter of Venezuela's President Hugo Chavez reacts to the announcement of his death in CaracasReuters
Supporters of Venezuela's President Hugo Chavez react to the announcement of his death in CaracasReuters
Supporters of Venezuela's President Hugo Chavez react to the announcement of his death in CaracasReuters
Ecuador's supporters of Venezuelan President Hugo Chavez hold candles as they gather outside Venezuela's embassy in QuitoReuters
Supporters of Venezuela's President Chavez show pictures of him as they react to the announcement of his death in Buenos AiresReuters
Bolivia's President Morales attends a ceremony in honor of Venezuela's President Chavez in La PazReuters
Supporters of Venezuela's President Hugo Chavez react to the announcement of his death in CaracasReuters
A supporter of Venezuela's President Hugo Chavez reacts to the announcement of his death in CaracasReuters
Ecuador's President Correa addresses the media to announce three days of national mourning to honour Venezuela's President Chavez in QuitoReuters
Peru's supporters of Venezuelan President Hugo Chavez shout slogans while gathering outside Venezuela's embassy in LimaReuters
Nicaragua's President Daniel Ortega speaks during an event to commemorate Venezuela's President Hugo Chavez in ManaguaReuters