Venezuela has announced seven days of mourning for Hugo Chavez, who has died aged 58 after 14 years as president.Thousands of Mr Chavez's supporters took to the streets of Caracas to express their grief.
Mr Chavez had been seriously ill with cancer for more than a year.
A self-proclaimed revolutionary, he 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.
Many had tears in their eyes. Some hugged each other. Most gathered sombrely to share their memories of the president.
For many, it was like having lost a family member.
"A great leader has left us, a father. A man that taught us how to walk down the path of revolution," said Ali Dominguez, a student.
But In Los Palos Grandes neighbourhood, inhabited by wealthier pro-opposition people, streets were already deserted in the early evening.
People took to Twitter to express their sentiments.
"I'm not celebrating at all, I just feel we have a new opportunity to have a better future," said Sharon Fandino.
Latin American leaders have begun arriving in Caracas to pay their respects - among them President Cristina Fernandez de Kirchner of Argentina, Jose Mujica of Uruguay and Evo Morales of Bolivia.Mr Chavez's body will be taken in a procession with a mounted escort to the Military Academy in Caracas where it will lie in state until a funeral on Friday.
Military units across the country have fired a 21-gun salute in his honour.
They will fire another cannon shot each hour until he is buried, the armed forces said.
All schools and universities have been shut for the week.
Mr Chavez's illness prevented him from taking the oath of office after he was re-elected for a fourth term in October.
Announcing the president's death on Tuesday, Vice-President Nicolas 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."
Police and troops would be deployed nationwide "to guarantee the peace", he added.
A statement from the military said it would remain loyal to the vice-president and to parliament, it added, urging people to remain calm.
Crowds of supporters gathered outside the Caracas hospital where he died, chanting: "We are all Chavez!"
There were isolated reports of violence after the news, with attackers burning the tents of a group of students who had been demanding more information about Mr Chavez's condition. Nobody was injured in the incident.
Succession Vice-President Maduro will assume the presidency until an election is called within 30 days.
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".
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 charismatic president.
Plot? The exact nature of Mr Chavez's cancer was never officially disclosed, leading to continuing speculation about his health, and he had not been seen in public for several months.
- 1954: Born 28 July in Sabaneta, Barinas state, the son of schoolteachers
- 1975: Graduates from Venezuelan Academy of Military Sciences
- 1992: Leads doomed attempt to overthrow government of President Carlos Andres Perez, jailed for two years
- 1994: Relaunches his party as the Movement of the Fifth Republic
- 1999: Takes office after winning 1998 election
- 2002: Abortive coup. Returns to power after two days
- 2011: Reveals he is being treated for cancer
- 2012 (October): Re-elected for another six-year term
- 2012 (December): Has fourth cancer operation in Cuba
- 2013 (February): Returns to Venezuela to continue treatment
- 2013 (March): Death is announced by Venezuelan government
Last May, the former army paratrooper said he had recovered from an unspecified cancer, after undergoing surgery and chemotherapy in 2011 and a further operation in February 2012.Despite this, he had most recently won another six-year presidential term in October 2012.
The vice-president has mentioned 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".
Mr Maduro 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.
Mr 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.
His government has implemented a number of "missions" or social programmes, including education and health services for all.
But his opponents accused him of mishandling the economy and taking the country towards dictatorship. Inequality has been reduced but growth overall has been lower than in some other Latin American economies.
Internationally, he was a staunch critic of US "imperialism" and accused Washington of backing a failed coup against him in 2002.
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.
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.