With each new story from the White House, each new made-for-television drama, Donald Trump more closely resembles Hugo Chávez. The showmanship and swagger, the blunders and the brilliance, the obsessions, ambitions, contradictions and sheer brio, even the tweets – it has all happened before in Venezuela.

I covered Chávez from 2006 to 2012 before moving to the United States. I am now struck daily by a sense of déjà vu. Trump is using the same playbook. The fixation with crowd sizes and victory margins in elections, the war on the media, the threats against companies, the conspiracy theories, the strange cabinet appointments, the picking of fights with neighbours, the blizzard of stunts and executive actions, is all pure Chávez.

The comparison will offend supporters of both presidents but is, in a way, a compliment. Chávez, who died in 2013, ruined the economy and gutted institutions, but he won election after election and is still revered by millions. If Trump is even half as shrewd, he will win again in 2020.

There are crucial differences. Chávez, a poor country boy, grew up in the military, came to politics through a bloody and bungled coup, read widely, embraced socialism, railed at the rich and transferred oil wealth to the poor. He never targeted immigrants. He rebutted a question that I once asked him by dismissing it as “imperialist” and showing the brown skin on his arm.

Trump, in contrast, grew up in the splendour of New York and parlayed his alpha-capitalist persona into reality-TV fame. He promotes US nationalism, promises tax cuts for the rich and makes coded and not-so-coded attacks on foreigners and people of colour.

Chávez was patient. He started cautiously and secured his control over all branches of government before turning radical. Trump lacks such restraint. Yet there are striking parallels of style and method. Both sensed voters’ desire for radical disruption. They swept to power vowing to overturn establishments, to banish “los corruptos” and “drain the swamp”.

Both had the gift of the gab. In the army, Chávez specialised in communications and moonlighted as a compère, hosting a beauty pageant. Both signalled their outsider status with colloquial speech, improvised riffs, bawdy humour, vitriolic insults and grandiose promises.

Both mastered television. While Trump was hiring and firing contestants on The Apprentice, Chávez was doing it for real on his weekly TV show, Aló Presidente. “Fuera!” he cried, ousting executives of the national oil company, PDVSA, and blowing a whistle, like a football referee.

Chávez also obsessed over his popularity. The media conspired to reduce his “victorias enormes” and used misleading camera angles to diminish his “gigantesca” crowds, he said.

When Steve Bannon, Trump's chief strategist, called the media “the opposition party” he was following Andres Izarra, Chávez’s information minister. Venezuela's media did, in fact, work to overthrow Chávez, notably during a 2002 US-backed coup which briefly ousted the comandante. This delegitimised the press and helped Chávez mould his own state media empire. His favourite TV host, an attack dog called Mario Silva, made US shock jock Sean Hannity seem tame.

Bannon's escalation of hostilities is astute. No matter what the boss does, or what is reported, it can all be framed as Trump v Media, and by extension Trump v Establishment. The longer he is in office the more useful this will be – he can be forever the insurgent, his heart in the right place, battling the elites.

Chávez fuelled polarisation. A third of the population adored him, a third loathed him; and, come election time, he courted the floating middle, the so-called ni-nis. He did this by baiting his opponents, and they fell for it. They bellowed and marched, feeling powerful. Yet their tone and rhetoric alienated people. The floaters sided with the guy who spoke their language.

Chávez picked fights. He phoned business leaders live on air to demand that they stop ripping off customers, expelled US diplomats, mobilised troops on the Colombian border and threatened to jail opponents. He used Twitter to great effect, interrupting televised events to respond to messages. He peddled conspiracy theories – assassination plots, fake moon landings, secret electromagnetic weapons – to bolster his world-view.

Both leaders promised golden ages of “winning” through infrastructure projects and new trade deals. As reality catches up with his promises, Trump may emulate another Chávez tactic: blasting his own government. Attack incompetent or treacherous minions who sabotaged the great vision. Name and shame in an Oval Office version of The Apprentice.

If the lesson for Trump’s opponents is to beware of overreaction, the lesson for his aides is to forfeit ego. Do not shine too brightly, because there is only one sun king.

I once asked Nuris Orihuela, the former head of Chávez’s space programme, about his suggestion that capitalism killed life on Mars. “The president is a good man,” she replied. “He speaks from the heart and looks you in the eye . . . So really, there is no reason to worry.”

Trump’s senior adviser Kellyanne Conway performed a similar pirouette when defending her boss’s mockery of a disabled reporter. “Look at what’s in his heart,” she said.