(CNN) -- A deeply divided Venezuela is mourning its late leader and preparing to pick a new president to replace him.
Venezuelan officials called for peace and unity after President Hugo Chavez's death on Tuesday, emphasizing in state television broadcasts that all branches of the government and the military were standing together.
Elections will be held in 30 days, and Vice President Nicolas Maduro will assume the presidency in the interim, Foreign Minister Elias Jaua said in a televised interview on state-run VTV.
Photos: Celebrities and Hugo Chavez
Vice president: Hugo Chavez is dead
Hugo Chavez's 2009 interview with CNN
Chavez: From failed coup to presidency
"We must unite now more than ever," Maduro said after he announced Chavez's death, calling on Venezuelans to remain respectful.
Henrique Capriles Radonski, a former presidential candidate and opposition leader, also called for Venezuelans to come together.
"This is not the time for difference," he said. "It is the time for union. It is the time for peace."
Supporters of Chavez poured into a Caracas square soon after news of his death spread. Some wept openly. Others waved flags and held up pictures of the late president.
But there was palpable tension in the streets, as some Venezuelans heading home from work tried to steer clear of Chavez's fervent supporters.
Chavez's remains will be taken to a military academy in Caracas on Wednesday, Jaua said. There he will lie in state for three days. His state funeral will be held there on Friday morning, Jaua said.
"Our people can count on having a government of men and women committed to protecting them," Maduro said.
Venezuela's military is in a "process of deploying ... to ensure the safety of all Venezuelans" and to support the country's constitution in the wake of Chavez's death, said Adm. Diego Molero, Venezuela's defense minister.
Molero pledged support to Maduro and National Assembly President Diosdado Cabello, two top officials who were close allies of the Venezuelan president.
The announcement of Chavez's death came hours after Maduro met with the country's top political and military leaders about Chavez's worsening health condition and suggested someone may have deliberately infected Chavez with cancer.
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
Shortly before his last trip to Cuba for cancer surgery in December, Chavez tapped Maduro as the man he wanted to replace him.
2006: Chavez calls Bush 'the devil'
Ban Ki-moon reacts to Chavez's death
The relationship between Chavez and U.S.
Hugo Chavez's legacy
"He is one of the young leaders with the greatest ability to continue, if I cannot," Chavez said.
Maduro made no mention of running for election in his public comments Tuesday, but he is widely expected to be the United Socialist Party of Venezuela's candidate for the job..
Word of Chavez's death drew swift expressions of sorrow and solidarity from regional allies.
Ecuador announced three days of national mourning to honor Chavez.
"The national government expresses its solidarity in light of this irreparable loss that puts the Venezuelan people and all the region in mourning and at the same time sends its heartfelt condolences to the family of the late champion of Latin America,"the country's foreign ministry said in a statement.
Bolivian President Evo Morales' voice cracked as he spoke to reporters, describing Chavez as someone "who gave all his life for the liberation of the Venezuelan people ... of all the anti-imperialists and anti-capitalists of the world."
But longtime critics of the controversial president offered a different take.
"Hugo Chavez was a destabilizing force in Latin America, and an obstacle to progress in the region," said U.S. Rep. Mike Rogers, the Republican chairman of the House Intelligence Committee. "I hope his death provides an opportunity for a new chapter in U.S.-Venezuelan relations."