MOURNERS from Iranian President Mahmoud Ahmadinejad to US Oscar-winner Sean Penn paid an emotional farewell to Hugo Chavez at today's funeral for the charismatic but divisive Venezuelan leader who changed the face of politics in South America.
Chavez died this week at age 58 after a two-year battle with cancer, devastating millions of mostly poor supporters who loved him for putting the country's vast oil wealth at their service, but giving hope to foes who saw him as a dictator.
A frequent visitor to Caracas and fellow "anti-imperalist," Ahmadinejad received a standing ovation as he took his place in a guard of honor by Chavez's coffin, then broke protocol to touch the casket and clench his fist in a revolutionary salute.
"Commander, here you are undefeated, pure, living for all time," Chavez's preferred successor, acting President Nicolas Maduro, said over the casket, his voice cracking with emotion.
"Your soul and spirit are so powerful that your body could not hold them, and now they are traveling this universe, growing with blessings and love."
The mourners chanted: "Chavez lives! The fight continues!"
Maduro laid a replica of the sword of 19th century independence leader Simon Bolivar on top of the coffin, which was draped in the country's red, yellow and blue flag.
A singer in a cowboy hat serenaded the mourners with music from Chavez's birthplace in Venezuela's "llanos" plains.
The late president's body is to be embalmed and shown "for eternity" - similar to how Communist leaders Lenin, Stalin and Mao were treated after their deaths.
His remains will lie in state for an extra seven days to accommodate the millions of Venezuelans who still want to pay their last respects to a man who will be remembered as one of the world's most colorful and controversial populist leaders.
Huge crowds of "Chavistas" gathered from before dawn for the ceremony at a military academy where his body was lying in state. Many were dressed in the red of the ruling Socialist Party, carrying his picture and waving Venezuelan flags.
"I asked God to grant him life, not me," said Leonida Munoz, 73, wearing a T-shirt bearing the image of Chavez's eyes. "He deserves to live more than I do."
She said she had been waiting more than 26 hours to view Chavez's coffin. More than 2 million people have filed past the casket since Wednesday, many sobbing, some saluting, and others crossing themselves.
In Caracas were most of Chavez's highest-profile Latin American friends, such as Ecuadorean President Rafael Correa and Brazil's former leader, Luiz Inacio Lula da Silva.
"Most importantly, he left undefeated," Cuban President Raul Castro said, referring to Chavez's four presidential election wins, among a string of other ballot victories in his 14-year rule.
"He was invincible. He left victorious and no one can take that away. It is fixed in history."
Celebrity mourners included U.S. civil rights leader Rev. Jesse Jackson, who led a prayer at the service and renowned conductor Gustavo Dudamel.
Dudamel, who heads Venezuela's Simon Bolivar Symphony Orchestra and the Los Angeles Philharmonic, led musicians at the funeral playing classical numbers and the national anthem.
Belarusian President Alexander Lukashenko and Ahmadinejad were among the more controversial figures present. Ahmadinejad has caused a storm back home for saying Chavez would be resurrected alongside Jesus Christ and a "hidden" imam who Shi'ite Muslims believe will rise up to bring world peace.
As well as leftist friends of Chavez, conservative leaders such as Chile's Sebastian Pinera and Colombia's Juan Manuel Santos were at the funeral.
The United States did not send senior officials.
Former U.S. Representative William Delahunt and U.S. Representative Gregory Meeks were attending, amid speculation of a possible post-Chavez rapprochement between the two ideologically opposed governments.
A government source said Chavez slipped into a coma on Monday before dying the following day of respiratory failure. The cancer had spread to his lungs, the source added.
Chavez never said what type of cancer he was suffering, and for privacy, chose to be mainly treated in Cuba.
His death paved the way for a new election in the OPEC nation that boasts the world's biggest oil reserves. But it is unclear when the vote will be held.
At the gates of the academy, activists handed out photos of Chavez along with printed quotes of his call for supporters to vote for Maduro should anything happen to him.
The constitution stipulates that an election must be called within 30 days, but politicians say the electoral authorities may not be ready and there has been talk of a possible delay.
Maduro, 50, a former bus driver who became foreign minister and then vice president, looks certain to face opposition leader Henrique Capriles, 40, the centrist governor of Miranda state who lost to Chavez in October's election. He will be sworn in as caretaker leader after the funeral on Friday.
The Supreme Court ruled on Friday that Maduro would not have to step down to campaign. Capriles called the decision a "constitutional fraud."
Opposition sources say the 30 or so political groupings making up the Democratic Unity coalition have again agreed to back Capriles, whose 44 percent vote share in 2012 was the best performance by any candidate against Chavez.
Contrasting with the outpouring of grief at the funeral, senior opposition figure Leopoldo Lopez cautioned that the post-Chavez era would not automatically bring a brighter future.
"The uncertainty goes on, as does the gross meddling by Cuba and the flagrant violation of the constitution. Our people continue to be overwhelmed by insecurity, inflation and food shortages," he said. "We call on all Venezuelans to join the struggle to build a peaceful way out of the crisis."
Two recent opinion polls gave Maduro a strong lead over Capriles, and Western investors and foreign diplomats are factoring in a probable win for Maduro and a continuation of "Chavista" policies, at least in the short term.
The latest survey, by respected local pollster Datanalisis, gave Maduro 46.4 percent versus 34.3 percent for Capriles. It was carried out on in mid-February, before Chavez's death.