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

People took to the streets in tears in the capital Caracas and other cities and towns after Vice-President Nicolas Maduro confirmed the death last night.

Mr Maduro, accompanied by senior ministers, was visibly choked as he said: "It's a moment of deep pain."

The flamboyant 58-year-old leader had undergone four operations in Cuba, as well as gruelling chemotherapy and radiation treatment, for the disease that was first detected in his pelvis in mid-2011. He optimistically declared himself cured twice.

Mr Chavez's latest surgery was carried out before Christmas and he has not been seen in public since flying back to Venezuela last month, where he was taken straight to a military hospital in Caracas for treatment.

He was re-elected in October with 55% of the vote, but was too ill to be sworn in for his six-year term beginning on January 10.

However, Venezuela's Supreme Court ruled he remained President, even in the hospital.

His death will test whether his brand of socialism can live on without his dominant personality at the helm.