Venezuela's President Hugo Chavez has died aged 58, after 14 years in power.
Mr Chavez had been seriously ill with cancer for more than a year, undergoing several operations in Cuba.
Crowds of supporters gathered outside the Caracas hospital where he died, chanting "We are all Chavez!"
A self-proclaimed revolutionary, Hugo Chavez was a controversial figure in Venezuela and on the world stage. A staunch critic of the US, he inspired a left-wing revival across Latin America.
Following his death, Vice-President Nicolas Maduro will assume the presidency until an election is held within 30 days, Foreign Minister Elias Jaua said.
"It is the mandate that Comandante President Hugo Chavez gave us," Mr Jaua told state television, adding that Mr Maduro would also be the candidate of the governing United Socialist Party (PSUV).
It was not immediately clear when the election would take place.
Mr Chavez's illness prevented him from taking the oath of office after he was re-elected for a fourth term in October.
The exact nature of his cancer was never officially disclosed, leading to continuing speculation about his health, and he had not been seen in public for several months.
Seven days of national mourning have been declared and his body will lie in state until a funeral on Friday.
Opposition leader Henrique Capriles, whom Mr Chavez defeated in October's election, called on the government to "act in strict accordance with its constitutional duties".
Mr Capriles offered his condolences to Mr Chavez's family, saying "we were adversaries, but never enemies".
A former paratrooper, Hugo Chavez burst onto Venezuela's national stage in 1992 when he led a failed military coup.
After two years in prison he returned to politics and was swept to power in a 1998 election.
A self-proclaimed socialist and revolutionary, he won enduring support among the poor and repeated election victories by using Venezuela's oil wealth to pursue socialist policies.
But his opponents accused him of mishandling the economy and taking the country towards dictatorship.
Internationally, he was a staunch critic of US "imperialism" and accused Washington of backing a failed coup against him in 2002.
In Tuesday's televised address, a tearful Mr Maduro said the president had passed away "after battling a tough illness for nearly two years".
"We have received the toughest and tragic information that... Comandante President Hugo Chavez died today at 16:25 (20:55 GMT)," he added.
Mr Maduro called on the nation to close ranks after its leader's demise.
"Let there be no weakness, no violence. Let there be no hate. In our hearts there should only be one sentiment: Love."
He promised to maintain Mr Chavez's "revolutionary, anti-imperialist and socialist legacy".
Police and troops would be deployed nationwide "to guarantee the peace", he added.
The vice-president also spoke of a plot against Venezuela, saying he had no doubt that Mr Chavez's cancer, first diagnosed in 2011, had been induced by foul play by Venezuela's enemies - the US promptly rejected the accusations as "absurd".
He said a scientific commission could one day investigate whether Mr Chavez's illness was brought about by what he called an enemy attack.
Two US diplomats had been expelled from the country for spying on Venezuela's military, he added.
A statement by the military issued after Mr Chavez's death said it would protect the sovereignty, integrity and security of the country. It would remain loyal to the vice-president and to parliament, it added, urging people to remain calm.
Mr Jaua said a procession would carry Mr Chavez's body to the Military Academy in Caracas on Wednesday, where it will lie in state until Friday to allow his supporters to pay their respects.
He added that the official funeral attended by foreign heads of state would take place at 10:00 local time (14:30 GMT) on Friday, and called on Mr Chavez's supporters to wear clothes in the three colours of the Venezuelan flag in his honour.
Thousands of Chavez supporters took to the streets of Caracas, chanting: "We are all Chavez!" and "Chavez lives!"
One of them, Francis Izquierdo, told Agence France-Presse: "He was a man who taught us to love our fatherland. The comandante is physically gone but he remains in our hearts and we must continue building the fatherland."
Some opposition politicians had argued that the President of the National Assembly, Diosdado Cabello, should take over as interim president in the event of Mr Chavez's death.
However, he was not among the political and military leaders who flanked the vice-president when he announced the news.
The opposition has yet to confirm who will be its official candidate for the presidential election, but Mr Capriles is widely expected to be chosen to stand against the vice-president.
The BBC's Irene Caselli, in Caracas, says Mr Maduro will probably win, but the question remains whether he will be able to lead Venezuela following the loss of its iconic president.
The US described the death as a "challenging time", reaffirming what it described as its support for the Venezuelan people and its interest in developing a constructive relationship with Caracas.
"As Venezuela begins a new chapter in its history, the United States remains committed to policies that promote democratic principles, the rule of law, and respect for human rights," said a statement from the White House.
Russia's permanent representative to the UN, Vitaly Churkin, said Mr Chavez had been a great politician, for his country, for Latin America and the world.
The government of Cuba declared three days of national mourning. In a statement read out on state television, it said Mr Chavez had "stood by Fidel [Castro] like a true son", referring to Cuba's former president, who stepped down in 2006 due to ill-health.
In Argentina, President Cristina Fernandez de Kirchner, a close friend, suspended all activities after the death was announced.
Peru's Congress held a minute of silence in his honour while Bolivia's President Evo Morales said he was leaving immediately for Caracas.
The Ecuadorian government said it felt the loss as its own, and hoped its neighbours could carry on Mr Chavez's revolution.
Analysts say Mr Chavez's death could alter the political balance in Latin America - dealing a blow to leftist states while favouring more centrist countries.
There could also be an economic impact given that Venezuela sells oil at below market prices to some neighbouring countries, especially in the Caribbean.
UK Foreign Minister William Hague said he was "saddened" to learn of the death, saying Mr Chavez had left a "lasting impression" on Venezuela.
One of the most visible, vocal and controversial leaders in Latin America, Hugo Chavez won the presidency in 1998 and had most recently won another six-year presidential term in October 2012.
His government has implemented a number of "missions" or social programmes, including education and health services for all. But poverty and unemployment are still widespread, despite the country's oil wealth.
Last May, he said he had recovered from an unspecified cancer, after undergoing surgery and chemotherapy in 2011 and a further operation in February 2012.
However, in December, he announced he needed further cancer surgery in Cuba, and named Mr Maduro as his preferred successor. Mr Chavez returned to Venezuela in February, but was confined to hospital.