As he languished in his jail cell 20 years ago, the failed coup plotter Hugo Chávez must have been grateful for every friend he could get. It was during that brief nadir that his close political and personal friendship with Nicolás Maduro, a 29-year-old bus driver-turned-union leader was forged Now the former foreign minister has been appointed Vice-President, and with deep uncertainty about the 58-year-old President's health after three cancer operations in 12 months, Mr Maduro is perfectly positioned to inherit Mr Chávez's self-appointed mantle of leader of Latin America's 21st-century "Bolivarian"revolution, named – inappropriately some historians say – after Simón Bolívar, the hero of Spanish-speaking Latin America's 19th-century independence from Spain. "Look where Nicolás is going," the President said as he proudly announced his new No 2. "Nicolás was a bus driver on the metro, and look how the bourgeoisie make fun of him."

Often regarded as a moderate within Mr Chávez's United Socialist Party of Venezuela (PSUV), with a rare ability to build consensus among its unruly factions, Mr Maduro has nevertheless revelled in his role as a thorn in Washington's side.

Earlier this year, at the Summit of the Americas in Cartagena, Colombia, the then foreign minister launched a stinging broadside at Barack Obama's attempts to contain Mr Chávez's revolutionary fervour. "Obama does not know the reality of our country," said Mr Maduro. "He acts with great cynicism, great wickedness. He has inherited, unfortunately, after having spent three years in government, the cynicism and wickedness [of George W Bush]."

As foreign minister, Mr Maduro was also instrumental in the signing of bilateral agreements with some of the US's most prominent and democratically challenged adversaries, including Cuba, Iran, Russia and Belarus.

In his new role, Mr Maduro will be treading an even narrower line than most vice-presidents between discrete impotence and preparing to potentially inherit sweeping powers. While he remains healthy, Mr Chávez calls the shots, wielding wide-ranging discretional authority over the Venezuelan state and responding contemptuously to critics. The President, for example, directly manages a series of state programmes lavishly funded with Venezuela's vast pool of petrodollars, including the National Development Fund and the Bilateral Venezuela-China Fund, whose revenues come from oil sales to the Asian giant. The funds run in parallel to the rest of the national budget and rarely publish accounts.

Mr Maduro will be counted on to continue providing the unconditional support that saw him among a tiny handful of family and confidantes who accompanied the President to Cuba for cancer treatment.

The Vice-President appears tailor-made for the role, and regularly engages in friendly joshing with his political mentor during the latter's TV appearances. One recent theme was the pair's battle to control their ample waistlines. Mr Chávez challenged Mr Maduro to lay off the outsize "submarine" sandwiches. Mr Maduro retorted by congratulating the President for losing "a few grams".

Although Mr Chávez appears to have made a strong recovery from the pelvic cancer that ravaged him earlier this year, real uncertainty about his long-term prognosis remains. He was unable to operate with his usual vigour during the presidential campaign that resulted in his victory over Henrique Capriles, the youthful, basketball-playing opposition candidate. And he has refused to publish the clinical details of his illness or even state what kind of cancer he was being treated for.

Under the Venezuelan constitution, Mr Maduro would oversee new elections should his boss become incapacitated in the first four years of his six-year term. If Mr Chávez fell seriously ill or died in the last two years of his term, then Mr Maduro would automatically become President. There is also another clause that would allow the Vice-President to temporarily stand in for the President for up to two successive 90-day periods if necessary.

Nevertheless, there remains genuine doubt about whether Mr Maduro, should the President sicken again, will get the chance to cling on to power for long. Despite owning the world's largest proven oil reserves – nearly 297 billion barrels, according to Opec – Venezuela's economic woes are mounting. The government has also appeared impotent in the face of a violent crime wave that is the worst in South America and has become the top concern of most Venezuelans.

Despite losing the election with 44 per cent of the vote against the incumbent's 55 per cent, Mr Capriles, a centrist who claims to offer a pragmatic, non-ideological alternative to Chávismo, has emerged strengthened from his nine-month campaign, with many analysts viewing him as the odds-on favourite to become Mr Chávez's real long-term successor.

The 11 points that separated them were 13 points fewer than Mr Chávez's winning margin in 2006 over Manuel Rosales. And while the President did raise his total vote count by 800,000, Mr Capriles received almost two million more than Mr Rosales. Mr Capriles now faces a high-profile campaign to return to the governorship of Miranda state, against the PSUV candidate Elías Jaua, the outgoing Vice-President, who is seen as representing a harder faction of Chávismo than Mr Maduro.

Should Mr Capriles win – as he did against another member of Mr Chávez's inner circle, Diosdado Cabello – he will likely continue to provide the leadership for the opposition it previously lacked. Were he to succeed Mr Chávez, Mr Maduro could face the fight of his life to hang on to the presidency.

Blood brothers: A special friendship

Nicolás Maduro became friends with Hugo Chávez 20 years ago. Impressed by Mr Chávez's efforts to oust an elected government that massacred hundreds of protesters opposed to its neo-liberal economic shock treatment, Mr Maduro began visiting the pugnacious army major in his cell in Yare prison.

The pair hit it off immediately and began plotting the meteoric political comeback that started as soon as "El Comandante" was pardoned by a new government in 1994. As Mr Chávez's political star rose, so did Mr Maduro's.

The President's affable sidekick first became a member of the 1999 constituent assembly convened by Mr Chávez, then a congressman and then, from 2006 until this month, foreign minister.