LONDON - Boris Johnson forged a high-profile career as a journalist before going into politics, rising to become British prime minister, never losing his flair for controversy in print and speech.

Johnson’s newspaper and magazine columns provided his detractors with a rich back catalogue and were frequently quoted back to him verbatim. The utterings -- and the offence they often caused -- would likely have sunk a more conventional politician.

Instead, Johnson blustered excuses, insisting he was always misquoted and taken out of context -- or just wilfully ignored the critics.

Comments included observations about the children of single mothers -- “ill-raised, ignorant, aggressive and illegitimate” -- gay men -- “tank-topped bumboys” -- and veiled Muslim women -- like “letterboxes” and “bank robbers”.

He also managed to offend countries, describing in-fighting in the Tory party once as like “Papua New Guinea-style orgies of cannibalism and chief killing”. Whole continents were not spared, such as the time when he described Africa as a “blot” but absolved Britain and its empire from any responsibility. “The problem is not that we were once in charge, but that we are not in charge any more,” he wrote in The Spectator in 2002. He was accused of racism for a Daily Telegraph column the same year about then prime minister Tony Blair’s trip to the Democratic Republic of Congo.

In it he referred to “cheering crowds of flag-waving piccaninnies”. “No doubt the AK47s will fall silent, and the pangas will stop their hacking of human flesh, and the tribal warriors will all break out in watermelon smiles to see the big white chief touch down in his big white British taxpayer-funded bird.”

At other times, he offended cities, accusing the people of Liverpool in 2004 of mawkishness, even as they mourned the kidnap and murder of a local man by extremists in Iraq.

Campaigners in the city were also pushing for police accountability after 97 Liverpool football fans had been crushed to death in the 1989 Hillsborough stadium disaster. “They see themselves whenever possible as victims, and resent their victim status; yet at the same time they wallow in it,” The Spectator magazine said in 2004 under Johnson’s editorship.

He was also a Conservative frontbencher at the time and was forced to go to the city to apologise. In 2016, as foreign secretary, Johnson’s past comments made for an uncomfortable first joint news conference with visiting US secretary of state John Kerry.

He was asked if he would apologise for saying that president Barack Obama was “part-Kenyan” with an “ancestral dislike for the British empire”.

He was also questioned about what he had to say to presidential candidate Hillary Clinton after he described her as having “dyed-blonde hair and pouty lips, and steely blue stare, like a sadistic nurse in a mental hospital”.

“I’m afraid there is such a rich thesaurus now of things that I’ve said that have been, one way or another, through what alchemy I do not know, somehow misconstrued, that it would really take me too long to engage in a full global itinerary of apology,” he stuttered in reply.

To what extent the fiercely ambitious Johnson’s words were his genuinely held beliefs or just those of a pen for hire was sometimes difficult to discern.

“My chances of being PM are about as good as the chances of finding Elvis on Mars, or my being reincarnated as an olive,” he said in 2004.

He famously wrote two versions of his column for the Daily Telegraph before the 2016 Brexit vote, eventually plumping to back the “leave” campaign.

His promises on Brexit could have filled a book. He dismissed claims -- later proved correct -- of an extra-marital affair as “an inverted pyramid of piffle”.

But as several MPs pointed out on Wednesday, he should have at least remembered his own words about political longevity, as one by one his colleagues abandoned him.

“It is a wonderful and necessary fact of political biology that we never know when our time is up,” he wrote in 2006, reflecting on the end days of Blair’s premiership.

“Long after it is obvious to everyone that we are goners, we continue to believe in our ‘duty’ to hang on...

“In reality, we are just terrified of the come-down.”