US President Donald Trump and Republican allies have escalated a campaign against US law enforcement agencies over their investigation into Russia by making public a classified memo that the FBI had sought to keep under wraps.

The document, drawn up by congressional Republicans, alleges bias against Mr Trump at the FBI and Justice Department in the investigations into Russian interference in the 2016 presidential election, and ties between Moscow and the Trump campaign.

Ignoring FBI urgings, Mr Trump approved the release of the memo, deepening an extraordinary showdown between the president and senior law enforcement officials over a probe that has dogged him for his first year in office and that is now headed by Special Counsel Robert Mueller.

As soon as Mr Trump declassified the four-page memo, telling reporters its contents told a disgraceful story of bias against him, Republicans on the House of Representatives Intelligence Committee released it to the public.

The document alleges the FBI concealed the Democratic ties of a source the agency used to justify surveillance on a Trump campaign worker.

It says a string of senior Justice Department officials signed off on this.

The memo has become a flashpoint in a battle between Republicans and Democrats over Mr Mueller's criminal probe, which is also believed to be looking into any attempts to impede the investigation.

Democrats say Mr Trump's allies hope to use the memo to protect the president and possibly to give him a reason to fire Deputy US Attorney General Rod Rosenstein, who hired Mr Mueller and so would be the person to dismiss him, or even Mueller himself.

Asked by reporters if he had confidence in Mr Rosenstein, Trump replied, "You figure that one out."

"A lot of people should be ashamed," Mr Trump said of the findings in the document.

He has repeatedly complained about Mr Mueller's investigation, denying any collusion or obstruction of justice. Moscow has denied any election meddling.

In a Twitter message on Friday, Trump accused top US law enforcement officers - some of whom he appointed himself – of politicising investigations.

It was his latest attack on top justice officials.

Mr Trump fired FBI Director James Comey in May last year, who later told a congressional hearing that he believed his removal was an effort by the US President to undermine the Russia probe.

Senator John McCain, who is regarded as a heavyweight in Congress on foreign affairs, strongly criticised his fellow Republicans and Mr Trump for attacking the FBI and the Justice Department.

"Our nations elected officials, including the president, must stop looking at this investigation through the warped lens of politics and manufacturing partisan sideshows. If we continue to undermine our own rule of law, we are doing Putins job for him," Mr McCain said in a statement, referring to Russian President Vladimir Putin.

The document, commissioned by the Republican chairman of the House intelligence panel, Devin Nunes, uses the case of investigations into Trump campaign aide Carter Page, saying the FBI used a biased source to justify surveillance on him.

It alleges that a dossier of Trump-Russia contacts compiled by former British spy Christopher Steele, and funded in part by US Democrats, formed an essential part of requests to a special court to be allowed to conduct electronic surveillance on Mr Page that began in October, 2016.

It says the initial application and subsequent renewal applications, signed off on by various senior Justice Department officials including Mr Rosenstein, did not mention the link between Mr Steele and the Democrats.

It also portrays Mr Steele as biased, saying he was passionate about him (Trump) not being president.

The memo largely repeated allegations that Nunes and others had made publicly previously and did not appear to include major surprises.

Two days ago, in a rare public rebuke of the president and Republicans in Congress who were pushing to release the memo, the Federal Bureau of Investigation said it had "grave concerns about material omissions of fact" in the document and it should not be made public.

The FBI director, Christopher Wray, was appointed by Trump. Democrats said the memo cherry picks information.