Venezuelan President Hugo Chavez has died aged 58 after a long battle with cancer.
His death was announced on national television by Vice President Nicolas Maduro, who said that Chavez died "after battling a tough illness for nearly two years."
The flamboyant leader had undergone four operations in Cuba for a cancer that was first detected in his pelvic region in mid-2011. He suffered a respiratory infection following his latest operation in December 2012 and had not been seen in public since.
The outspoken leader, who was a hero to Venezuela's poor, had sought to remake Venezuela into a socialist state, but left with many citizens still facing poverty despite the country's huge oil wealth.
Chavez, who took power in 1999, was a firebrand former military general who modeled himself on Simon Bolivar, the 19th-century Latin American independence leader.
He took ever greater control over his country's government and economy during his 14-year rule by nationalizing industries, including the booming oil sector, while marginalizing the traditional elite and middle classes in his effort to turn Venezuela into a socialist state under his so-called Bolivarian Revolution.
Decorated Military Career
Born in 1954 to two schoolteachers, Hugo Rafael Chavez Frias said his desire to play major league baseball prompted him to enroll in the Venezuelan Academy of Military Sciences. He joined the army in 1975 and rose to lead an elite paratrooper unit.
While in the military, Chavez joined other officers to secretly form the Venezuelan People's Liberation Army and began meeting with Marxist opposition leaders. He later formed the Bolivarian Revolutionary Movement.
Chavez’s decorated military career, which he partly spent fighting leftist insurgents, lasted 17 years.
WATCH: A look back on Chavez and his 14 years as Venezuela's president:
In 1992, he led an unsuccessful military coup that earned him two years in prison along with thousands of supporters. He was later pardoned.
Following his release, Chavez organized a leftist political party called the Fifth Republic Movement, the MVR, before winning a landslide victory in presidential elections in 1998 by riding a wave of popular outrage over corruption among the traditional political elite.
The youngest elected president in Venezuelan history, Chavez set to work rewriting the constitution to boost the president's powers and change the country's name to the Bolivarian Republic of Venezuela. It passed a referendum with 88 percent of public support.
'New Page In History'
Chavez, who often appeared in public wearing a trademark red shirt, criticized capitalism and used Venezuela's oil wealth to build low-income housing and other projects that made him wildly popular among Venezuela's many poor.
Speaking in 2009 alongside then-Libyan leader Muammar Qaddafi, he announced they faced a common vision.
"We are conscious of the fact that we are writing a new page in history," he said. "We are changing history, confronting imperialism, confronting the bourgeois, confronting underdevelopment, and confronting the colonialism our nation has suffered for the last 500 years."
In 2002, Chavez tightened his hold on the state-run oil company, which led to widespread protests. Military leaders briefly ousted Chavez that year, but he soon returned to power.
Two years later, the opposition failed to recall Chavez when 59 percent of voters supported him in a national referendum.
Chavez was a very visible leader who broadcast weekly radio and television shows called "Hello President." He sometimes spoke for hours at a time.
He also cracked down against media and human rights groups he said were stooges of foreign governments, branding his opponents traitors and "Yankees," allies of what he frequently described as the imperialist U.S. government.
Allied With U.S. Critics
Under Chavez, the relationship between Venezuela and the United States was strained at the best of times. A critic of the U.S.-led war in Iraq, Chavez called then-President George W. Bush "the devil" in a 2006 speech at the UN.
"Yesterday the devil came here. Right here. And it smells of sulfur still today," Chavez said. "Yesterday, ladies and gentlemen, from this rostrum, the president of the United States, the gentleman to whom I refer as the devil, came here, talking as if he owned the world. Truly. As the owner of the world."
Allying himself with other U.S. critics such as Russia's Vladimir Putin, Chavez led an effort to unite leftist Latin American leaders including Bolivia's Evo Morales and Ecuador's Rafael Correa, helping set up a regional bank and the Union of South American Nations.
Chavez was reelected in 2006. In December 2010, Venezuela's outgoing, Chavez-controlled congress granted him the power to rule by decree for 18 months, just before the convening of a new parliament that included more opposition members. He justified the law as necessary to respond to flooding that killed 40 people.
Chavez was reelected for a third term in October 2012.
Under Venezuelan law, new elections now have to be held within 30 days.
Despite Venezuela's vast oil wealth, the country has faced growing chaos and deep recession. Unlike other, booming South American economies, Venezuelans have seen food shortages, an energy crisis, and the highest inflation rate in Latin America. Unemployment and poverty remain widespread.
Chavez leaves behind a wife and five children.