Venezuela gave Hugo Chavez a lavish farewell at a state funeral Friday that brought some of the world's most notorious strongmen to tears, with music, prayers and a fiery speech by his successor.
More than 30 heads of state paid tribute to the leftist firebrand president as his body lay in state in a flag-covered coffin at a military academy, bringing the curtain down on a 14-year reign that divided his nation.
"There you are, undefeated, pure, transparent, unique, true, alive forever," his political heir Nicolas Maduro said as his voice rose and cracked in a eulogy that both praised his mentor and railed against his opponents.
"Mission accomplished comandante! The struggle goes on," said the vice president due to be sworn in as acting president later Friday.
Venezuela's opposition will boycott the inauguration, setting the stage for a bitter election campaign, five months after Chavez beat a stronger challenger than he had been used to -- Henrique Capriles, who will now likely face Maduro.
The Supreme Court backed the inauguration and ruled that Maduro could run for office, a ruling that Capriles deemed "fraudulent." He argued that the constitution requires the vice president to step down to run for office.
"Nicolas, nobody elected you president. The people didn't vote for you, kid," he said.
Before the political battle began, the state funeral opened with Venezuelan conductor and Los Angeles Philharmonic maestro Gustavo Dudamel leading an orchestral rendition of the national anthem.
Maduro placed a replica of the golden sword of South American independence hero Simon Bolivar on his mentor's wooden casket and then handed it to his family at the end of the funeral.
Presidents Mahmoud Ahmadinejad of Iran and Alexander Lukashenko of Belarus sat next to each other, wiping away tears as a band played one of Chavez's favorite sentimental songs.
"We have lost a great leader, a great man," Ahmadinejad said after the ceremony. "Hugo came from the people and he served the people."
Several Latin American leaders, including Cuban President Raul Castro, were invited to stand in an honor guard around the coffin, which was closed and covered in the yellow, blue and red colors of Venezuela.
In addition to alliances with a motley crew of anti-Western autocrats, Chavez had also built friendships with some Hollywood stars, including Oscar-winning actor Sean Penn, who attended the funeral.
Chavez's body will lie in state for seven more days and officials said it will be embalmed and preserved "like Lenin" to rest in a glass casket in the military barracks where he plotted a failed coup in 1992.
Foreign Minister Elias Jaua and a crowd of flag-waving Chavez supporters greeted leaders as they arrived at the military academy for the funeral. The crowd chanted "Chavez lives, the struggle goes on!"
Venezuela is giving Chavez a long farewell, with hundreds of thousands of people filing past his open casket nonstop since Wednesday, one day after Chavez lost his two-year battle with cancer at age 58.
Some fainted from the heat, many spent the night outside to see the man who became a hero of the poor and villain of the rich with social programs funded by Venezuela's vast oil wealth.
The doors reopened to the public after the funeral and the casket was half open again, allowing people to once more see his face.
But in a country divided by Chavez's populist style, opinions of his legacy vary, with opposition supporters in better-off neighborhoods angry at the runaway homicide rate, high inflation and expropriations.
"There are no words for what Chavez did: he ruined Venezuela," said Giuseppe Leone, a 78-year-old Venezuelan-Italian in the well-to-do east of the city.
Leaders from Africa and the Caribbean attended the funeral, but European nations sent lower-level delegations, while the United States was represented by its charge d'affaires and two politicians from President Barack Obama's Democratic Party.
Despite testy ties, Maduro welcomed US Representative Gregory Meeks of New York and former congressman Bill Delahunt of Massachusetts.
"We love all people of the Americas. But we want relations of respect, of cooperation, of true peace," he said, calling for a world "without empires."
US civil rights leader Jesse Jackson gave a prayer, urging God to "heal the breach between the US and Venezuela."
Under Chavez, Venezuela's oil wealth underwrote the Castro brothers' communist rule in Cuba, and he repeatedly courted confrontation with Washington by cozying up to governments that shared his "anti-imperialist" worldview.
Maduro said Chavez's body will be taken to the "Mountain Barracks" in the "January 23," a public housing project that was a bastion of Chavez support. The barracks will be converted into a Museum of the Revolution.
It was there that Chavez spearheaded what proved to be a failed coup against then-President Carlos Andres Perez on February 4, 1992. His arrest turned him into a hero and led to his first of many election victories in 1998.