A vast crowd of red-clad Venezuelans filled the streets of the capital Wednesday to mourn President Hugo Chavez, as governments across Latin America began looking ahead to an election that will determine his successor and the direction of the South American energy giant.

Chavez’s flag-draped coffin was slowly carried through the streets of Caracas over the course of the day, on a route winding toward the military academy where he started his career as a young cadet from a poor rural family. His body will lie in state there until his official burial on Friday.

Chanting “Chavez lives!” the mourners poured into central Caracas from rough hillside barrios and rural towns, vowing that their hero’s self-styled socialist revolution would endure beyond his death.

“He gave us the instructions and we will all follow them. We are all Chavez,” said Elia Cuba, a 59-year-old accountant.

Specifically, Chavez instructed his supporters to vote for Nicolas Maduro, the country’s interim president and the man now tapped to carry forth the leftist blend of socialism, nationalism and electoral patronage known as “Bolivarianism,” after 19th-century independence hero Simon Bolivar, Chavez’s idol.

Even as several of Chavez’s closest allies arrived in Caracas to bid farewell, governments were scrambling to calculate what his death might mean beyond Venezuela. Although he irritated the United States with his alliance with Iran, Chavez built many relationships through his leftist ideology and multibillion-dollar oil diplomacy, which injected Venezuela and its shaky politics into many economies.

Chavez forged particularly close ties to Cuba, providing Havana with about 100,000 barrels of subsidized oil a day, and receiving in return thousands of Cuban workers, from intelligence agents to doctors and sports trainers.

“Latin America has never had a more generous benefactor than Chavez,” said Michael Shifter, president of the Washington think tank Inter-American Dialogue.

“His death doesn’t mean an abrupt cutoff of such aid, but it will probably result in a gradual reduction, especially as economic difficulties and fiscal pressures become more acute in Venezuela,” Shifter said, citing the country’s huge debts, soaring inflation and chronic shortages.

Chavez was the first of a wave of Latin American leftist leaders who have won and held on to office since the Cold War era, and now figures such as Ecuador’s Rafael Correa, Bolivia’s Evo Morales and Argentina’s Cristina Fernandez de Kirchner say they will carry on Chavez’s goals for regional integration.

The government has announced that an election will be held within a month, but with no date set, speculation is growing that Maduro could try to schedule the vote for as soon as possible, capitalizing on the emotions unleashed by Chavez’s death after a nearly two-year bout with cancer.

Maduro is expected to face opposition leader Henrique Capriles, who lost to Chavez by 11 percentage points in October’s presidential election.

‘He awoke a people’

Among Chavez followers there are also fears of a potential power struggle between Maduro and another Chavez loyalist, National Assembly President Diosdado Cabello. “We want Nicolas [Maduro],” said Nelly Leticia Castillo, 50, choking up with emotion as she said her farewell. “I hope he and Diosdado can come together.”

David Smilde, a Venezuela expert at the University of Georgia, said he did not expect significant changes to come to Latin America following Chavez’s death, given that the leader’s endorsement is likely to boost Maduro at the polls.

“First, Maduro, who will likely win the presidency in the coming elections, was his foreign minister for the past six years and architect of Venezuela’s involvement in the region,” Smilde said.

“Chavez’s legacy is his legacy, and there will likely be continuity,” he said.

Throughout the day Wednesday, Venezuela’s vast state television apparatus played Chavez’s speeches and ran footage of him hugging followers and saluting adulatory crowds. State newspapers declared that even in death he remained “the guiding light” of this country of 29 million.

Chavez underwent a fourth cancer surgery in Cuba on Dec. 11 and never recovered, nor did he appear publicly again. He died at a military hospital here at 4:25 p.m. Tuesday, two weeks after arriving from Havana, where he was being treated, in the middle of the night.

Marlenis Vanegar, 75, said she had prayed for the president outside the military hospital, where groups of Chavistas — as Chavez’s followers call themselves — had gathered for vigils. “He left a legacy for us,” she said. “He awoke a people. Don’t anyone think that this revolution will now be lost. We will continue with the candidate that he left for us.”

Unofficial campaign

The death of the leader seemed, at least for the moment, to bring a sense of relative calm to Venezuela, with the volume turned down on the political vitriol that had characterized the discourse of government officials and Chavez opponents in recent days.

“In the immense pain of this historic tragedy that has affected our fatherland, we call on all the compatriots to be vigilant for peace, love, respect and tranquility,” Maduro said on national TV. “We ask our people to channel this pain into peace.”

Capriles told the country that now was “not the time to highlight what separates us.”

Still, as Chavez lay in agony in recent days, it had begun to appear as if an unofficial campaign had already begun, with Maduro and Capriles directing highly personal attacks against each other. In a tense political environment, much of the country was talking about what would come after Chavez’s death. Now, Venezuelans are awaiting word on when the election will be held.

In the meantime, the Interior Ministry ordered a ban on alcohol sales and the carrying of guns in public through Tuesday.

The country is also wondering where Chavez will be buried. The leader had ordered a huge modernist mausoleum built for Bolivar — a structure that critics say looks like a skateboard ramp — in the center of Caracas. And now, many wonder whether Chavez’s body will wind up there.

“For his political brilliance and commitment to the country, Commander Chavez has earned his place beside the Liberator Simon Bolivar in the Pantheon,” said a longtime Chavez associate, Freddy Bernal, in comments quoted by the Reuters news agency.

Nick Miroff contributed to this report