Three days to go, and there’s something fitting about the sordid fashion in which this most sordid of US presidential campaigns is ending – in a fury of renewed speculation about Hillary Clinton’s emails, brought about by an FBI investigation into a disgraced ex-Congressman who happened to be married to one of her top aides, and his habit of sexting pictures of his genitalia to underage girls.

I refer, of course, to the batch of emails found on the ex-Congressman’s laptop, that may be “pertinent” to the issue of whether the Democratic candidate deliberately sent classified information on a private server when she was Secretary of State. The Clinton aide is Huma Abedin. Her husband, from whom she is now separated, is Anthony Weiner, known to his more intimate correspondents as “Carlos Danger”.

Would that it were so funny. The fall-out from election 2016 (about which, according to a New York Times/CBS News poll last week, 82 per cent of respondents felt “disgusted”) is immense. But nothing is more ominous than how the FBI, the country’s vastly powerful but traditionally non-partisan law enforcement agency, has been turned into a tool of politics.

The FBI, of course, has been embroiled in political controversy before – just say J Edgar Hoover. Its investigations of people like Martin Luther King, and various “subversive” groups in the 1960s and 1970s, remains a blot on its reputation, while Richard Nixon sought to use the Bureau and its investigative resources for his own nefarious purposes.

In fact, the FBI turned against Nixon over Watergate – the 1972 scandal that defines him and which also unfolded in an election year. The circumstances, however, were very different. “Deep Throat”, The Washington Post’s celebrated source as it delved into the break-in at Democratic Party headquarters in Washington, turned out decades later to be the then deputy director of the FBI, Mark Felt.

But no one had an inkling at the time, for Felt leaked his information to Bob Woodward on the deepest of backgrounds. Compare that with the behaviour of James Comey, today’s FBI director who just 11 days before the election sent a letter to Congress saying that a new crop of Clinton emails had come to light during an unrelated investigation (that quickly turned out to be the Weiner sexting affair).

Elect, marry, avoid: Donald Trump, Hillary Clinton and a blobfish

As “October surprises” go, this was a 10-megaton bomb. Donald Trump’s claim that the case is bigger than Watergate may be nonsense. But with his action, Comey turned the campaign on its head. Up to that moment, Clinton had been cruising to victory. Now she’s in a desperate fight.

The emails’ contents are a mystery, and may remain so until after the election. Quite possibly they will add nothing to what came to light in the original investigation, which found no evidence she had deliberately mishandled classified material – although Comey did castigate her for being “extremely careless.”

But the very fact there are more of them has raised all the old doubts about Clinton’s honesty, her disregard for the norms, her compulsive secrecy. And what candidate wants to have their name and the word FBI in the same headline, on the eve of an election? Trump and the Republicans furthermore have been gifted another argument: why vote for Clinton if she might be indicted, why subject the country to endless Congressional investigation of a new president and, who knows, impeachment and a constitutional crisis?

Nor are the emails the end of it. Separate leaks last week suggested the FBI was at odds with the Justice Department, to which it reports, over an investigation into “pay to play” allegations against the Clinton Foundation, and suggestions that big donors were given preferential treatment by Hillary’s State Department. So what on earth is going on?

Now police and law enforcement institutions are not usually bastions of liberal thinking, and there’s no reason to suppose FBI is any different. Comey himself is a Republican, albeit a very independent-minded one. So what led him to jettison the Bureau’s long and wise tradition of not commenting on ongoing investigations – and, on the face of it, to break the law by violating a 1939 Act that bars federal employees from political activity?

Donald Trump's most controversial quotes Show all 14 1 /14 Donald Trump's most controversial quotes Donald Trump's most controversial quotes On Isis: "Some of the candidates, they went in and didn’t know the air conditioner didn’t work and sweated like dogs, and they didn’t know the room was too big because they didn’t have anybody there. How are they going to beat ISIS?" Getty Donald Trump's most controversial quotes On immigration: "I will build a great wall — and nobody builds walls better than me, believe me —and I’ll build them very inexpensively. I will build a great, great wall on our southern border, and I will make Mexico pay for that wall. Mark my words." Reuters Donald Trump's most controversial quotes On Free Trade: "Free trade is terrible. Free trade can be wonderful if you have smart people. But we have stupid people." PAUL J. RICHARDS | AFP | Getty Images Donald Trump's most controversial quotes On Mexicans: "When Mexico sends its people, they’re not sending their best. They’re sending people that have lots of problems. They’re bringing drugs. They’re bringing crime. They’re rapists." Getty Donald Trump's most controversial quotes On China: "I just sold an apartment for $15 million to somebody from China. Am I supposed to dislike them?... I love China. The biggest bank in the world is from China. You know where their United States headquarters is located? In this building, in Trump Tower." Getty Images Donald Trump's most controversial quotes On work: "If you're interested in 'balancing' work and pleasure, stop trying to balance them. Instead make your work more pleasurable." AP Donald Trump's most controversial quotes On success: "What separates the winners from the losers is how a person reacts to each new twist of fate." Donald Trump's most controversial quotes On life: "Everything in life is luck." AFP Donald Trump's most controversial quotes On ambition: "You have to think anyway, so why not think big?" Getty Images Donald Trump's most controversial quotes On his opponents: "Bush is totally in favour of Common Core. I don't see how he can possibly get the nomination. He's weak on immigration. He's in favour of Common Core. How the hell can you vote for this guy? You just can't do it." Reuters Donald Trump's most controversial quotes On Obamacare: "You have to be hit by a tractor, literally, a tractor, to use it, because the deductibles are so high. It's virtually useless. And remember the $5 billion web site?... I have so many web sites, I have them all over the place. I hire people, they do a web site. It costs me $3." Getty Images Donald Trump's most controversial quotes On Barack Obama: "Obama is going to be out playing golf. He might be on one of my courses. I would invite him. I have the best courses in the world. I have one right next to the White House." PA Donald Trump's most controversial quotes On himself: "Love him or hate him, Trump is a man who is certain about what he wants and sets out to get it, no holds barred. Women find his power almost as much of a turn-on as his money." Getty Images Donald Trump's most controversial quotes On America: "The American Dream is dead. But if I get elected president I will bring it back bigger and better and stronger than ever before and we will make America great again." GETTY

For sure as hell, Comey, a former deputy attorney general under George W. Bush and well aware of the ways of Washington, knew exactly the explosive impact his vaguely worded letter to Congress would have, so close to the election. So why did he do it? My guess is, for several reasons.

Months earlier, after announcing Clinton would not be indicted, he promised Republican Congressional leaders he would let them know if any new evidence cropped up. He surely felt he had to honour that pledge, even if it looked like caving in to Republican pressure. Second, had he waited until after the election, he might have been accused of a cover-up.

Third, he has to worry about cohesion and morale at the organisation he heads. Clearly, a large faction at the FBI thought Clinton was getting away with it. Had he kept quiet, news of the Weiner laptop emails might have been leaked by a disgruntled employee even closer to the election, making matters yet worse. There are hints too of a personal animosity of Comey towards the Clintons.

Third, Comey is a free agent. Normally an Attorney General would have ordered the FBI to say nothing at so politically charged a moment, and that would have been that. Alas, Loretta Lynch, the current AG, compromised herself irredeemably when she had that hour long impromptu airport chat with Bill Clinton, just as the FBI probe of his wife was reaching a climax. She took herself out of the case; Comey could do as he pleased.

And thus today’s mess. The FBI has effectively allowed itself to become an opposition research tool of the Republican party. Not only is it hard to imagine Comey staying on a single day under a President Hillary Clinton. Worse, the supposedly unbiased FBI will henceforth be just one more weapon in Washington’s political trench warfare.