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.
Venezuelan President Hugo Chavez blows a kiss as he arrives at a rally with supporters in Caracas in February 2012, before flying to Cuba for a new round of cancer surgery.
Retired Lieutenant Colonel Hugo Chavez, who led a coup attempt in February 1992, is greeted by supporters in Caracas in July 1997.
Chavez the candidate is accompanied by his wife, Marisabel (right), during a march across Caracas to officially open his presidential campaign in August 1998.
Chavez jokes about his baldness due to cancer treatment while talking to the media at Miraflores Palace in Caracas in August 2011.
Cuban President Fidel Castro (right) greets Chavez upon his arrival at Jose Marti Airport in Havana in December 1994.
Chavez and Russian Prime Minister Vladimir Putin look at a globe while visiting the Russian Navy's "Kruzenshtern" sailing ship in the port of Guaira, near Caracas, in April 2010.
Chavez is greeted by then-Libyan leader Muammar Qaddafi (right) upon his arrival in Tripoli in October 2010.
Chavez greets his Bolivian counterpart, Evo Morales (right), during a military parade to commemorate the 20th anniversary of his failed coup attempt on February 4, 2012.
Yasser Arafat (left), then president of the Palestinian Authority, talks with media beside Chavez at the Convention Center in Havana, Cuba, in April 2000.
Chavez presents Pope John Paul II with a replica of Simon Bolivar's sword "Libertador" at the Vatican in September 1999.
Chavez plays a guitar, which was a gift from Mexican singer Vicente Fernandez, during a cabinet meeting at Miraflores Palace in Caracas in September 2012.
Chavez embraces his daughters Maria (left) and Rosa at the Miraflores Palace in Caracas in July 2011.
Chavez plays with his 1-year-old daughter Rosa in October 1998.
Venezuelan soldiers loyal to President Carlos Andres Perez and journalists lie in one of the entrance rooms of the presidential palace of Mirafiores in Caracas after rebels led by Chavez attacked the palace on February 2, 1992.
Chavez (left) is shown in a 1992 file photo in jail after being arrested for a coup attempt.
Chavez talks to reporters after being freed from jail on March 26, 1994.
Chavez is greeted by students in Caracas as he leaves Simon Bolivar University in September 1998.
Chavez salutes from atop an armored vehicle during Army Day in Caracas on June 24, 2005.
Chavez welcomes Argentina's soccer coach Diego Maradona at Miraflores Palace in Caracas in July 2010.
Chavez prepares to deliver the first pitch during a baseball game in Caracas in May 2007.
Chavez with his daughters Rosa (right) and Maria while recovering from cancer surgery in Havana in a photo dated February 15, 2013.
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.