A tough and charismatic leader, Hugo Chavez divided opinion both at home and abroad.To his many supporters he was the reforming president whose idiosyncratic brand of socialism defeated the political elite and gave hope to the poorest Venezuelans.
His strident criticism of the United States won him many friends among the "pink tide" of political leaders in Latin America and he effectively used his country's vast oil reserves to boost Venezuela's international clout.
But to his political opponents he was the worst type of autocrat, intent on building a one-party state and ruthlessly clamping down on any who opposed him.
Hugo Rafael Chavez Frias was born on 28 Jul 1954 in the Venezuelan state of Barinas, one of seven children. His parents were both school teachers and the family lived in relative poverty.
He attended the Daniel O'Leary High School in the city of Barinas before going to the Venezuelan Academy of Military Sciences in the capital, Caracas where, he later said, he found his true vocation.
He also found time to play baseball and to study the lives of the 19th Century South American revolutionary leader Simon Bolivar and the Marxist Che Guevara.
He graduated with honours in 1975 but had already begun to form the political ideas that he would later put into practice as president, including the belief that the military had a duty to step in if a civilian government was deemed to have failed to protect the poorest in society.
Coup He was posted to one of the many counter-insurgency units that were tackling the various Marxist groups bent on overthrowing the presidency of Carlos Andres Perez but he saw very little action, spending his time reading a great deal of left-wing literature.
In 1981 he was assigned to teach at the military academy where he had been a student and found himself in a position to indoctrinate the next generation of army officers with his political ideas.
His superiors became alarmed at the extent of his influence and he was posted to remote Apure state, where, it was assumed, he could do little damage.
He busied himself by making contact with local tribes in the area, something that would influence his own policies towards indigenous people when he finally came to power.
In February 1992 he led an attempt to overthrow the government of President Perez amid growing anger at economic austerity measures that had led to widespread protests.
The revolt by members of the Revolutionary Bolivarian Movement claimed 18 lives and left 60 injured before Colonel Chavez gave himself up.
Revolution He was languishing in a military jail when his associates tried again to seize power nine months later.
That second coup attempt in November 1992 was crushed as well, but only after the rebels had captured a TV station and broadcast a videotape of Chavez announcing the fall of the government.
He spent two years in prison before relaunching his party as the Movement of the Fifth Republic making the transition from soldier to politician.
With an eye to wider opinion he spent time canvassing a number of political leaders in Latin America finding strong support and friendship from Cuba's revolutionary president, Fidel Castro.
Chavez firmly believed in overthrowing the government by force but was persuaded to change his mind and instead became a candidate in the 1998 presidential elections.
Unlike most of its neighbours, Venezuela had enjoyed an unbroken period of democratic government since 1958, but the two main parties, which had alternated in power, stood accused of presiding over a corrupt system and squandering the country's vast oil wealth.
Hugo Chavez promised "revolutionary" social policies, and constantly abused the "predatory oligarchs" of the establishment as corrupt servants of international capital.
Never missing an opportunity to address the nation, he once described oil executives as living in "luxury chalets where they perform orgies, drinking whisky".
Media star He quickly gained widespread support, not just from the poorest in Venezuelan society but also from a middle class which had seen its standards of living eroded by economic mismanagement. It was these middle class votes that were instrumental in propelling Chavez into power with 56% of the vote.
Despite the revolutionary rhetoric he employed during the campaign his first government set out on a relatively moderate path appointing a number of conservative figures to political positions.
He ran the economy largely according to guidelines set down by the International Monetary Fund and made a positive effort to encourage investment from global corporations.
He also began a programme of social reform, investing in the country's crumbling infrastructure and setting up free medical care and subsidised food for the poor.
In order to stay in touch with his people he set up weekly shows on radio and television where he explained his policies and encouraged citizens to phone in and question him directly.
In 1999 he proposed setting up a new constitutional assembly, gaining overwhelming support for the idea in a public referendum, itself an unheard of feature in Venezuelan politics.
In subsequent elections to the new body, Chavez supporters won 95% of the seats and set about drafting a new constitution which was approved by an overwhelming majority of the population.
One stipulation of the new order was that presidential elections should be held in 2000 which Chavez duly won with 59% of the vote.
Coup However, he soon faced opposition both from outside and inside Venezuela. Relations with Washington reached a low when he accused it of "fighting terror with terror" during the war in Afghanistan after the attacks on the US on 11 September 2001.
Opposition inside the country came from middle class groups who had seen their political power eroded by Chavez and who accused him of steering the country towards a one-party state.
In early 2002 the whole country was embroiled in a general strike and Chavez was pushed from office on 12 April after attempting to take control of the country's oil industry.
But, just two days later, after his supporters - mainly Venezuela's poor - took the streets, he was back in the presidential palace.
The 2006 presidential elections saw Chavez gain 63% of the vote whereupon he announced that his revolutionary policies would now be expanded.
He brought forward proposals that would allow him to stand for the presidency indefinitely, a measure that was approved in a referendum by 54% of those voting.
He also created economic and political ties with newly elected left-wing leaders in other South American countries including Daniel Ortega, who came to power in Nicaragua in 2007.
Relations with the US remained strained. While Chavez congratulated US President Barack Obama on his election victory in November 2008, he strongly condemned western military action in Libya in 2011.
Obsession "I am not Obama's enemy but it's difficult not to see imperialism in Washington," he told the BBC. "Those who don't see it, don't want to see it, like the ostrich."
At home, his much-vaunted economic reforms were running out of steam. Domestic support for his "Bolivarian" socialism was being sorely tested by economic recession and inflation soared to 30% eroding the savings of the middle classes.
Hugo Chavez started as a reforming president, intent on addressing the inequalities in Venezuelan society giving food, medical care and, above all, a political voice to the poor.
Venezuela today has the fairest income distribution in Latin America.
But Chavez failed to implement a long-term solution for the country's economic problems. Violent crime rose during his time in office, while government corruption continued.
Chavez was convinced that his destiny was to rule Venezuela and be a regional leader who could counteract US influence in Latin America.
The tensions inherent in that conviction were identified by Colombian Nobel laureate Gabriel Garcia Marquez, who met and travelled with Chavez before he took office for the first time.
It was like talking to two contrary men, Garcia Marquez wrote.
"One to whom inveterate luck has granted the the chance to save his country. The other, an illusionist, who could go down in history as just another despot."