CARACAS President Hugo Chavez died on Tuesday after a two-year battle with cancer, ending 14 years of tumultuous and divisive rule that won him passionate support among the poor but hatred from business leaders and wealthy Venezuelans.
The flamboyant 58-year-old had undergone four operations in Cuba for a cancer that was first detected in his pelvic region in mid-2011. He vanished from public view after December 11 surgery that resulted in complications and respiratory infections.
"It's a moment of deep pain," said Vice President Nicolas Maduro, choking up during a national address. "Commander, thank you so much, on behalf of these people whom you protected."
Military chiefs quickly pledged loyalty to Maduro, who will be caretaker leader until elections are called within 30 days. Weeping Chavez supporters poured onto the streets, chanting "Chavez lives! The revolution continues!" and "We are Chavez!"
"Don't let anyone try to convince you Chavez has gone ... He will always be with us," said Congress head Diosdado Cabello.
The president's death was announced by Maduro, flanked by cabinet ministers, less than an hour after he passed away.
State TV broadcast Chavez's emotional last speech from December, shops in Caracas locked up for fear of looting, and condolences came from around the world, including messages from filmmaker Oliver Stone and U.N. Secretary General Ban Ki-moon.
Tensions ran high in some areas. Colombia's RCN TV showed one of its reporters bleeding from a head wound after she was apparently beaten by Chavez supporters outside the military hospital.
Chavez easily won a new six-year term at an election in October and his death is devastating for millions of supporters who adored his charismatic style, anti-U.S. rhetoric and oil-financed policies that brought subsidized food and free health clinics to long-neglected slums.
Detractors, however, saw his one-man style, gleeful nationalizations and often harsh treatment of opponents as traits of an egotistical dictator whose misplaced statist economics wasted a historic bonanza of oil revenues.
Chavez's corpse will lie in state at a Caracas military academy until a formal funeral ceremony on Friday, and seven days of mourning will be observed, officials said.
"The funeral of Chavez is going to rival Eva Peron's in Argentina," said Daniel Hellinger, a Venezuela expert in the United States, referring to the beloved former first lady of Argentina who died at the height of her popularity in 1952.
MADURO FAVORITE TO WIN ELECTION
Chavez's death opens the way for a new election that will test whether his socialist "revolution" can live on without his dominant personality at the helm.
The new vote will likely pit Maduro against Henrique Capriles, the centrist opposition leader and state governor who lost to Chavez in October. Maduro appealed for calm and respect for democracy.
One recent opinion poll gave Maduro a strong lead because he is Chavez's preferred successor, enjoys support among many of the working class and could benefit from an inevitable surge of emotion in the coming days.
Maduro has been a close ally of Chavez for years and would be very unlikely to make significant changes to the late president's socialist policies, although he could at some point try to ease tensions with investors and the U.S. government.
Just hours before Chavez's death, though, Maduro alleged that "imperialist" conspirators had infected the president with cancer among a plethora of conspiracies with domestic opponents. The government never said what type of cancer Chavez had, but experts suspect it was a soft-tissue sarcoma.
A victory by Capriles would bring in much deeper changes and would be welcomed by business groups and foreign investors, although he would probably move cautiously in order to lower the risk of political instability and violence.
Venezuela has the world's largest oil reserves and some of the most heavily traded bonds, so investors will be highly sensitive to any signs of turmoil.
U.S. President Barack Obama said his government was interested in starting a new relationship with Venezuela.
"At this challenging time ... the United States reaffirms its support for the Venezuelan people and its interest in developing a constructive relationship with the Venezuelan government," Obama said in a statement.
An opposition election win would move Venezuela closer to the United States and upend alliances with Latin American states that have relied on Chavez's oil-funded largesse - most notably communist-led Cuba, which recovered from financial ruin in the 1990s largely thanks to Venezuelan aid.
Chavez was a garrulous figurehead for a global "anti-imperialist" alliance stretching as far as Belarus and Iran, and will be sorely missed by anti-U.S. agitators.
After the cancer was diagnosed in June 2011, Chavez went through several cycles of disappearing from the public eye for weeks at a time for treatment in Havana, only to return just as his adversaries were predicting his demise.
His health weakened severely just after his re-election on October 7, possibly due to his decision to campaign for a third term instead of stepping aside to focus on his recovery.
Chavez was raised by his grandmother in a house with a mud floor in rural Venezuela and evoked almost religious passion among poor supporters who loved his folksy charm, common touch and determination to put the country's oil wealth at their service.
He burst onto the national scene by leading an attempted coup in 1992. It failed and he was imprisoned, but he then formed a political party on his release two years later and swept to power in a 1998 election.
It was the first of four presidential election victories, built on widespread support among the poor.
But Chavez alienated investors with waves of takeovers and strict currency controls, often bullied his rivals, and disappointed some followers who say he focused too much on ideological issues at the expense of day-to-day problems such power cuts, high inflation and crime.
Chavez built a highly centralized political system around his larger-than-life image and his tireless, micro-managing style created something close to a personality cult. He was particularly adept at exploiting divisions within a fractious opposition.
Chavez was briefly toppled in a coup in 2002, but returned triumphantly after his supporters took to the streets.
Apparently realizing the end was nigh, Chavez named Maduro his successor in December, just before his fourth operation, which followed months of chemotherapy and radiation treatment.
On February 18, Chavez made a surprise pre-dawn return from Cuba and was taken to a ninth-floor suite of a military hospital in Caracas, surrounded by tight security.
The government published a handful of pictures of Chavez lying in a hospital bed while he was still in Havana - the only time he was seen since the latest surgery. Supporters had held tearful vigils around the country to pray for his recovery.
Maduro, 50, will now focus on marshalling support from Chavez's diverse coalition, which includes leftist ideologues, businessmen, and radical armed groups called "colectivos".
Seeking to knock down rumors of tensions at the top of the ruling Socialist Party (PSUV), Maduro has stressed the unity between him and Cabello, a powerful former army buddy of Chavez who heads the National Assembly.
Maduro is a former bus driver who rose from union activist to foreign minister and then to president-in-waiting. He won Chavez's confidence by meticulously echoing his vitriolic rhetoric and never airing a dissenting opinion.
Maduro has mimicked Chavez's rabble-rousing style in recent weeks, peppering speeches with insults aimed at adversaries.
Capriles, Maduro's likely opponent, is a 40-year-old governor of Miranda state who led a hard-fought campaign against Chavez in the October election.
There are clear ideological differences between the 20 or so groups in the opposition's Democratic Unity coalition and without their enmity to Chavez to bind them, the alliance could splinter.
Until recently, polls had shown Capriles would beat any of Chavez's proteges. But the naming of Maduro as Chavez's heir, and the outpouring of emotion that will accompany Chavez's death, have changed the picture.
A survey carried out by local pollster Hinterlaces between January 30 and February 9 gave Maduro 50-percent support, compared to 36 percent for Capriles.
(Additional reporting by Reuters reporters across Latin America, Editing by Terry Wade, Kieran Murray and David Brunnstrom)