Latin American leaders and US foes paid tribute to Venezuelan leader Hugo Chavez on Friday as he lay in state in a flag-draped coffin during a lavish state funeral before the nation swears-in an interim president.
Venezuelan conductor and Los Angeles Philharmonic maestro Gustavo Dudamel led an orchestra's rendition of the national anthem to open the ceremony for the man whose socialist rule earned him friends and foes at home and abroad.
Chavez's political heir, Nicolas Maduro, placed a replica of the golden sword of South American independence hero Simon Bolivar on his mentor's wooden casket as foreign dignitaries applauded.
Several Latin American leaders, including Cuban President Raul Castro, then stood around the coffin, which was closed and covered in the yellow, blue and red colors of Venezuela, in an honor guard.
Iranian President Mahmoud Ahmadinejad and Belarussian strongman Alexander Lukashenko were next, the two of them standing on either side of their ally, who used petrodollars to form an anti-American bloc.
Chavez had also built friendships with some Hollywood stars, including Sean Penn, who attended the funeral.
Venezuela has given a long farewell to Chavez, with hundreds of thousands of people filing past his open casket nonstop since Wednesday. Though popular among the nation's poor, his policies alienated the upper-middle class.
Maduro, his vice president, was due to be sworn-in as acting president later Friday pending elections. But the opposition said it would boycott the event.
"We want to firmly tell the world and Venezuela that we won't attend today's session of the National Assembly because we consider it another electoral act and a violation of the Venezuelan constitutional order," said deputy Angel Medina of the Democratic Union Roundtable, an umbrella grouping of opposition parties.
Chavez's body will lie in state for seven more days and officials said his body 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. The crowd chanted "Chavez lives, the struggle goes on!"
Ahmadinejad, looking emotional, hugged Jaua and pumped both fists in the air toward the Chavez loyalists.
When he had landed early Friday, the Iranian leader, whose nation's nuclear program has angered the United States, said "Chavez will never die, his soul and spirit are alive in the hearts of fighters."
Lukashenko, once dubbed "Europe's last dictator" by the United States, smiled and pumped his left fist at the crowd.
Castro, whose nation's economy relies on cheap Venezuelan oil shipments to stay afloat, waved both hands and then held them together.
Chavez's mother, Elena Frias, raised her arms toward the cheering crowd, crying and wiping her tears with a white handkerchief.
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 Democratic Party politicians.
Spain sent the heir to the throne, Prince Felipe, while Russian President Vladimir Putin, a close Chavez ally, dispatched his foreign minister, Sergei Lavrov.
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 anti-Western governments in Russia, Syria and Iran.
The former paratrooper, who died Tuesday at age 58 after a long battle with cancer, will lie in state an extra seven days to allow him to be viewed by everybody who wants to.
Maduro said Thursday the 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 is now being converted into a Museum of the Revolution.
It was there that Chavez had 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, leading to his first of many election victories in 1998.
But Maduro suggested that Chavez may one day be moved elsewhere, a nod to popular pressure for him to be taken to the national pantheon to lie alongside Latin American independence hero Simon Bolivar.
Maduro, 50, has now taken on the leadership of Chavismo, a leftist movement that poured the nation's oil riches into social programs.
He will likely face off in elections against opposition leader Henrique Capriles, who lost to Chavez in presidential voting in October of last year.
The government said more than two million people had come since Wednesday to get a glimpse of their hero. Many stood in line through the night.
"It doesn't matter how many hours we wait. We will be here until we see him," said Luis Herrera, 49, a driver wearing a red beret who was in line with countless others in the middle of the night.
For the public viewing, Chavez was in a half-open, glass-covered casket in the academy's hall, wearing olive green military fatigues, a black tie and the iconic red beret that became a symbol of his 14-year socialist rule.
People blew him kisses, made the sign of the cross or gave military salutes as they walked by. A four-man honor guard and four tall candelabras flanked the coffin, with a golden sword at the foot of it.
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 murder rate, high inflation and expropriations.