Chavez's coffin made its way through the crowds atop an open hearse on an eight-kilometer (five-mile) journey that wound through the city's north and southeast, into many of the poorer neighborhoods where Chavez drew his political strength.
At the academy, Chavez's family and close advisers, as well as the presidents of Argentina, Bolivia and Uruguay, attended a funeral Mass around the president's glass-topped casket.
The public then began filing past to peer at their longtime president, many of them coming closer to him than they had ever been while he was alive. Some placed their hand over their heart, others saluting or raising a fist in solidarity. The viewing lasted far into the night.
The head of Venezuela's presidential guard, Gen. Jose Ornella, told The Associated Press late Wednesday that Chavez died of a massive heart attack after great suffering.
"He couldn't speak but he said it with his lips ... `I don't want to die. Please don't let me die,' because he loved his country, he sacrificed himself for his country," said Ornella, who said he was with the socialist president at the moment of his death Tuesday.