Venezuelan President Hugo Chavez gestures as he speaks to delegates at the Climate Change Conference on December 16, 2009 in Copenhagen, Denmark. (Peter Macdiarmid/Getty Images)
CARACAS, Venezuela (CNN) -- The funeral for Hugo Chavez was Friday, but his final resting place will not be a cemetery.
In an unexpected twist, it was announced that the Venezuelan president will be embalmed "just like Lenin (and) Mao Zedong" and laid to rest at a military museum where generations of Venezuelans can visit.
It is a reminder that Chavez's image -- a symbol of hope to some and ineptitude to others -- will not soon fade.
RELATED | Venezuelan president Hugo Chavez dead at 58
MORE | Carter remembers Chavez for gains for poor
Chavez, who brought to Venezuela a social revolution with anti-American flair, allied himself with others at odds with the United States. So it was no surprise that Iranian President Mahmoud Ahmadinejad was among the heads of state to arrive in Caracas for the funeral.
"He was a dear friend of all nations worldwide," Ahmadinejad said to the crowd and the Venezuelan state broadcaster VTV there. "He was the emotional pillar for all the revolutionary and freedom-seeking people of the region and the world."
The United States, which doesn't have an ambassador in Venezuela, was represented at the funeral by its charge d'affaires at its embassy in Caracas, James Derham.
U.S. Rep. Gregory Meeks, D-New York, and former lawmaker William Delahunt of Massachusetts made up the rest of the U.S. delegation.
Chavez died at 58 Tuesday after a long battle with cancer. Thousands of his supporters lined the streets Wednesday in a procession from the military hospital where he died to a military academy where Venezuelans could view him.
As president, Chavez cultivated an image as a protector of the country's marginalized, and his followers worshiped him with fervor. The turnout at the military academy to view Chavez was so great that the viewing was extended for another seven days.
Vice President Nicolas Maduro will be sworn in Friday night as the country's interim president. Under the constitution, new elections are to be called within 30 days.
Maduro, whom Chavez named as his preferred successor, made the announcement Thursday about Chavez's final resting place.
"The body of our leader will be embalmed, and it will ... be surrounded by crystal glass forever, present forever, and always with his people," he said on state-run TV.
Cuban President Raul Castro, Brazilian President Dilma Rousseff and Colombian President Juan Manuel Santos were among the leaders already in Venezuela early Friday.
In all, at least 50 different countries were sending delegates for the funeral, Maduro said.
Chavez first announced his cancer diagnosis in June 2011, but the government never revealed details about his prognosis or specified what kind of cancer he had.