Something bizarre has happened in Wales. Neil Hamilton has returned to politics.

In 1997, when he was thrown out of the House of Commons by the electors of Tatton, it seemed inconceivable that Hamilton could ever make a political comeback. The Conservative Party, on which he had inflicted grievous embarrassment by his bumptious and impenitent behaviour during the cash-for-questions affair, was never going to welcome him back.

Yet here he is, 19 years later, not just as one of the seven UKIP candidates newly elected to the Welsh Assembly, but as their leader. It was supposed that his fellow Assembly Member, Nathan Gill, UKIP’s leader in the principality and the architect of its success there, would assume that role.

But Hamilton stood against Gill, and beat him by four votes to three. UKIP’s national leader, Nigel Farage, has described this as “unjust and a deep act of betrayal”.

For Farage detests Hamilton, and prevented him standing as a UKIP candidate in England at the 2015 general election.

Hamilton, with characteristic impenitence, says of Farage: “I was chosen democratically by our AMs. I can’t see why Nigel should have a problem with democracy.”

In case that does not sound insolent enough, Hamilton directs a further barb at Farage: “We in Wales will give appropriate weight to the opinion of the MEP for the South East of England.”

How reminiscent this behaviour sounds of the way Hamilton behaved during the 1980s and 1990s. But not all readers of ConHome can remember that distant period, and even those of us who lived through those times may have suppressed some of our more painful memories.

So here is a short account of the life of Mostyn Neil Hamilton. He was born in 1949 in Fleur-de-Lis, a pit village near Blackwood, in Monmouthshire. Both his grandfathers were coal miners, and his father was a chief engineer for the National Coal Board.

Hamilton the younger was educated at Ammon Valley Grammar School, the University of Wales in Aberystwyth, and Corpus Christi College, Cambridge. At the age of 15 he joined the Conservative Party, for which he stood as a parliamentary candidate in February 1974, in Abertillery, and in 1979 in Bradford North.

From an early age, he opposed the Common Market, as it was then known, and espoused free-market economics. He was a playful and ebullient reactionary, who loved shocking people. In June 1983, he was elected as the Conservative MP for Tatton, in Cheshire, and got married to Christine Holman, who had worked as secretary to several Conservative MPs, including the famously extrovert Gerald Nabarro, and Michael Grylls, the father of Bear Grylls.

Neil and Christine Hamilton were good company, deeply devoted to each other and all the better for being a bit louche, and they in turn inspired a high degree of loyalty. As Lord Lexden, now the Conservative Party’s official historian, recalls, “Neil and Christine were great friends of mine. Colourful and careless, but not crooked has always been my view.”

In the summer of 1990, a few months before the end of Margaret Thatcher’s premiership, Hamilton was made a whip. He was one of those who visited her at Number Ten, during her downfall, to implore her to carry on.

He backed John Major for the succession, and from April 1992 until October 1994 served as minister for deregulation and corporate affairs.

Then disaster, as described in the diaries of Hamilton’s friend and fellow MP, Gyles Brandreth, who in his entry for Wednesday 19 October 1994 writes:

“I’ve just come from the Chamber where Stuart Bell, out of the blue, on a point of order, got up and told the House that the Guardian is accusing Neil Hamilton and Tim Smith of taking £2,000 a time to ask questions on behalf of Harrods. It beggars belief. There’s a buzz in the building that makes me feel people believe it. I am now off to the Smoking Room to see if the first editions are in yet.”

The next day, Smith admitted he took money from Mohammed Al-Fayed, the proprietor of Harrods, and resigned. Brandreth, who had been a friend of Smith since Oxford days, was bewildered:

“This doesn’t make sense. Neil and Christine are real friends. I can’t believe it – and yet – I almost don’t want to put this in writing – I know they did go to Paris at Fayed’s expense. They revelled in it. They relish these treats. But a Paris freebie is one thing: 2,000 quid a question quite another.”

The conventional thing for Hamilton to do in these circumstances would have been to stand down from his ministerial post unless and until he could clear his name. But instead he protested his innocence, clung to his job and issued a writ against the Guardian. As Brandreth reports,

“The Tea Room is not happy: ‘no smoke without fire’, ‘Neil’s a greedy bugger, we all know that’, ‘let him fight his libel action from the backbenches, then come back in glory.’ The last line (from Sir Fergus Montgomery) is the right one, isn’t it?”

Within a few days, Hamilton was forced to resign, having upset almost everybody, including the Prime Minister, John Major. But Hamilton continued to protest his innocence. “I believe him, but millions won’t,” Brandreth writes.

A band of like-minded friends including Lord Harris of High Cross continued to stand by Hamilton, and contributed to his legal fees. But he possesses a catastrophic inability to keep quiet, or to show the slightest degree of penitence even for the inconvenience he is causing to his supporters, let alone for anything he may actually have done.

Sir Gordon Downey, the Parliamentary Commissioner for Standards, conducted an inquiry, and found Hamilton guilty of taking cash for questions. In 1997, the BBC journalist Martin Bell stood as an independent candidate against him in Tatton, was given a free run by the other parties and defeated him.

Hamilton fought a libel action against Al-Fayed, lost, and in 2001, unable to pay his legal costs, went bankrupt.

And that, one would think, was the end of Hamilton, at least as far as politics was concerned. Having become a conspicuous representative of the “sleaze” of which Major’s government stood accused, Hamilton embarked on a tawdry career as a minor celebrity.

He and his wife, Christine, slaked their apparently insatiable thirst for attention by appearing on a series of downmarket television programmes: as the Guardian has recently reminded us, Neil danced for the cameras while having fish poured over him by Johnny Vegas, and Christine flirted with Louis Theroux.

Yet UKIP was waiting for him, and in 2011, when he attended its annual conference, he at once stood out as a person of superior experience and eloquence, as well as irrepressible shamelessness. So although Farage, having at first made him welcome, succeeded in blocking his attempts to stand for the Commons in a winnable English seat, Hamilton was able, in his native Wales, to gain admission via the UKIP list to the Assembly.

And there he is, helping yesterday to block the attempt by Carwyn Jones, the Welsh Labour Leader, to be re-elected as First Minister. For Hamilton is a man fertile in expedients, who will have seen what a wizard wheeze it was to add UKIP’s seven votes to those of Plaid Cyrmu and the Conservatives in order to thwart Labour.

Hamilton is in his element, giving any number of interviews in which in a tone of sweet reasonableness he justifies unblushing intransigence. What a strange reminder he is, to some of us, of old, unhappy, far-off things, and battles long ago. And how angry Farage must be to find himself upstaged by this gifted, genial but also impossibly selfish and disreputable survival from the last century.