Christopher Steele, the former MI6 agent who investigated Donald Trump’s alleged Kremlin links, was so worried by what he was discovering that at the end he was working without pay, The Independent has learned.

Mr Steele also decided to pass on information to both British and American intelligence officials, after concluding that such material should not just be in the hands of political opponents of President Trump – who had hired his services – but was a matter of national security for both countries.

However, security sources say Mr Steele became increasingly frustrated that the FBI was failing to take action on the intelligence from others as well as him.

He came to believe there was a cover-up: that a cabal within the Bureau blocked a thorough inquiry into Mr Trump, focusing instead on the investigation into Hillary Clinton’s emails.

Donald Trump says unverified claims are blot on intelligence agencies

It is believed that a colleague of Mr Steele in Washington, Glenn Simpson (a former Wall Street Journal reporter who runs the firm Fusion GPS) felt the same way, and at the end also continued working on the Trump case without being paid.

Fusion GPS had been hired by Republican opponents of Mr Trump in September 2015. In June 2016, Mr Steele came on the team. He was, and continues to be, highly regarded in the intelligence world.

In July, Mr Trump won the Republican nomination and the Democrats became new employers of Mr Steele and Fusion GPS. In the same month, Mr Steele produced a memo, which went to the FBI, stating that Mr Trump’s campaign team had agreed to a Russian request to dilute attention on Moscow’s intervention in Ukraine.

Four days later, Mr Trump stated that he would recognise Moscow’s annexation of Crimea. Officials involved in his campaign had already asked the Republican party’s election platform to remove a pledge for military assistance to the Ukrainian government against separatist rebels in the east of the country.

Mr Steele claimed that the Trump campaign was taking this path because it was aware that the Russians were hacking Democratic Party emails. No evidence of this has been made public, but the same day that Mr Trump spoke about Crimea he called on the Kremlin to hack Hillary Clinton’s emails.

By late July and early August, MI6 was also receiving information about Mr Trump. By September, information to the FBI began to grow in volume: Mr Steele compiled a set of his memos into one document and passed it to his contacts at the FBI.

But there seemed to be little progress in a proper inquiry into Mr Trump. The Bureau, instead, seemed to be devoting their resources in the pursuit of Hillary Clinton’s email transgressions.

The New York office, in particular, appeared to be on a crusade against Ms Clinton. Some of its agents had a long working relationship with Rudy Giuliani – by then a member of the Trump campaign – since his days as public prosecutor and then-Mayor of the city.

As the election approached, FBI director James Comey made public his bombshell letter saying that Ms Clinton would face another email investigation. Two days before that, Mr Giuliani, then a part of the Trump team, talked about “a surprise or two you’re going to hear about in the next few days”.

“We’ve got a couple of things up our sleeve that should turn things around,” he said.

CNN anchor calls out Trump team over criticism of Russia allegations

After the letter was published, Mr Giuliani claimed he had heard from current and former agents that “there’s a kind of revolution going on inside the FBI” over the original decision not to charge Ms Clinton, and that Mr Comey had been forced by some of his agents to announce the reinvestigation.

Democrats demanded an investigation into how Mr Giuliani acquired this knowledge – without getting an answer.

In October a frustrated and demoralised Mr Steele, while on a trip to New York, spoke about what he has discovered to David Corn, the Washington editor of magazine Mother Jones. There was a little flurry of interest that quickly died down.

Mr Trump’s surprise election victory came and the Democrat employers of Mr Steele and Mr Johnson no longer needed them. But the pair continued with their work, hopeful that the wider investigation into Russian hacking in the US would allow the Trump material to be properly examined.

It was against this background that Senator John McCain, who had been hearing with growing alarm reports about Mr Trump and the Kremlin, met Sir Andrew Wood (a former British ambassador to Moscow, who had spent 10 years in Russia and is highly respected for his knowledge of Russian affairs) at a security conference in Halifax, Canada.

Sir Andrew stressed to Senator McCain that he had not read the dossier, but vouched for Mr Steele’s professionalism and integrity. The chair of the Senate Armed Forces Committee then sent an emissary to London who picked up the dossier from an intermediary acting on behalf of Mr Steele. The Senator personally took the material to Mr Comey.

Mr Trump and Barack Obama were briefed about the allegations as part of a report into Russian hacking a week ago. Mr Trump remained silent about them until they were published this week, and then he angrily denounced them as lies. His spokesperson said he could not recall the briefing.