Venezuelans flocked to see president Hugo Chavez lying in state Thursday, as his political heir revealed he would be embalmed "like Lenin" and displayed in the barracks where he plotted a failed coup.

As people streamed to pay their respects in a military academy, interim leader Nicolas Maduro said the public viewing period would be extended by at least seven more days after a state funeral with world leaders on Friday.

The former paratrooper, whose socialist revolution delighted the poor and infuriated the wealthy, will be embalmed "like Ho Chi Minh, Lenin and Mao" and kept in a glass casket to be seen "for eternity," Maduro said.

Maduro said the body will be taken to the "Mountain Barracks" in the January 23 slum that was a bastion of Chavez support and 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 president Carlos Andres Perez on February 4, 1992. His arrest turned him into hero, leading to his 1998 election victory.

But Maduro, who faces an election soon, 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.

While he indicated that the president would be moved to the barracks Friday, a senior minister later said Chavez would continue to lie in state in the academy for a week.

Chavez lay 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.

But the government said more than two million people came to get a glimpse of their hero, whose petrodollar-fueled socialism earned him friends and foes at home and abroad. Many had stood in line through the night.

"He's in there, but my comandante is immortal," said Saul Mantano, a 49-year-old salesman with a hat emblazoned with Chavez's name and the Venezuelan flag. "I didn't want to see him dead, but it's a reality now."

Soldiers and civilians, many clad in red, walked past the casket with just seconds to pause, pumping their fists to their hearts or blowing kisses.

They were forbidden from taking pictures or carrying cellphones.

Chavez lay with a red sash across his torso bearing the word "militia" -- the 120,000-strong armed civilian force that he had formed to spearhead his so-called Bolivarian Revolution.

A four-man honor guard and four tall candelabras flanked the coffin, with a golden sword at the foot of it.

"Seeing him was very impressive. It brought back all the memories of what we have done together in 14 years, thanks to him," said 34-year-old driver Chanel Arroyo.

The country gave Chavez a rousing send-off through the streets of Caracas on Wednesday, one day after he lost his battle with cancer at the age of 58, with a sea of people in red shirts throwing flowers on his coffin.

The academy opened to the public after a ceremony late Wednesday with Chavez's tearful mother, three daughters and son, a group of aides and the presidents of Argentina, Bolivia and Uruguay, all close allies.

Chavez's death was a blow to the alliance of left-wing Latin American powers he led, and it has plunged his OPEC member nation into uncertainty.

Maduro, 50, has now taken on the leadership of Chavismo, an ideology that poured the nation's oil riches into social programs.

He will likely face off in elections to be called within 30 days against opposition leader Henrique Capriles, who lost to Chavez in the October presidential polls.

"Maduro is already our president. It's what Chavez wanted and we will vote for him when elections come," said one mourner, Margarita Martinez, 37.

In a country divided by Chavez's populist style, opinions of his legacy differ, with opposition supporters in better-off neighborhoods angry at the runaway murder rate, high inflation and expropriations.

"Things have gotten worse. Venezuela used to be safer, we could afford to buy things," said Inacio Da Costa, a 20-year-old university law student eating ice cream in a square in the opposition's bastion in the east of the city.

"There's a lack of security and our money is worth nothing."

Chavez was just as polarizing on the international stage.

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.

His closest ally, Cuban President Raul Castro, said his friend Chavez had died "undefeated, invincible, victorious" after "entering through the great door of history."

Castro and Brazilian President Dilma Rousseff went to see the casket and spoke with one of Chavez's daughters as they joined the leaders of several Latin American nations.

Iranian President Mahmoud Ahmadinejad and Belarussian strongman Alexander Lukashenko will be also be among 55 heads of state or government attending Friday's state funeral.

Maduro has picked up on Chavez's anti-US rhetoric, expelling two US military attaches and accusing Venezuela's enemies of somehow causing the president's cancer.

But a senior US official said the United States -- denounced by Chavez as "the empire" -- hopes to forge a "positive relationship" with Venezuela once the upheaval caused by Chavez's death is over.