Image copyright Getty Images Image caption Donald Trump's use of Twitter to attack opponents is unprecedented

Donald Trump has attacked special counsel Robert Mueller's investigation into Russian interference in the US presidential election he won in 2016.

He tweeted that the inquiry was unfair - and reiterated there had been "no collusion" between his election campaign and Russia.

He added that it was dominated by "hardened Democrats" and supporters of his defeated opponent Hillary Clinton.

Mr Mueller, a highly regarded former head of the FBI, is a Republican.

The president's comments came a day after his lawyer, John Dowd, said it was time for the special counsel's investigation to end. Initially Mr Dowd said he was speaking for the president but later clarified he was "speaking for myself".

Mr Trump's latest tweet drew warnings from fellow Republicans about interfering with the investigation.

In earlier tweets, the president also berated former FBI deputy director Andrew McCabe, who was fired by Attorney General Jeff Sessions on Friday just two days before he was due to retire, and former FBI director James Comey, whom Mr Trump sacked last year. The latter firing led to the Mueller investigation being set up.

Mr Trump accused Mr Comey of lying under oath before Congress, and described the contemporaneous notes that Mr McCabe and Mr Comey took following discussions with him as "fake memos".

Mr McCabe has given memos about conversations he had with President Trump to the Mueller inquiry, US media say.

The memos could support claims that Mr Trump sought to obstruct justice.

Mr Mueller has so far indicted 19 people.

Image copyright Reuters Image caption Robert Mueller has admirers on all sides of US politics

But Republican Senator Lindsey Graham said Mr Mueller should be allowed to proceed without interference, and that many Republicans shared his view.

He also warned Mr Trump against any attempt to dismiss Mr Mueller.

"If he tried to do that, that would be the beginning of the end of his presidency, because we're a rule of law nation," Mr Graham said.

Republican Senator Jeff Flake, a frequent Trump critic, said it appeared the president's latest comments seemed to be preparing the ground for the firing of Mr Mueller.

"I don't know what the designs are on Mueller, but it seems to be building toward that, and I just hope it doesn't go there, because it can't. We can't in Congress accept that," he told CNN.

"I'm just puzzled by why the White House is going so hard at this, other than that they're very afraid of what might come out."

Senate Minority Leader Charles Schumer accused Mr Trump of "floating trial balloons about derailing" the investigation.

"Our Republican colleagues, particularly the leadership, have an obligation to our country to stand up now and make it clear that firing Mueller is a red line for our democracy that cannot be crossed," the Democrat said in a statement.

A showdown is coming

Analysis by Anthony Zurcher, BBC North America reporter

With a weekend free of scheduled presidential obligations, Donald Trump has ratcheted up the rhetoric directed toward independent counsel Robert Mueller.

Perhaps it is because the president feels emboldened by the one-two punch of the Republican intelligence committee conclusion that there was no "collusion" between the Trump camp and Russia, and his attorney general's decision to fire former FBI deputy director Andrew McCabe. Or maybe it is because Mr Trump is on edge following reports that Mr Mueller is now looking into the Trump Organization's business dealings with Russia.

Whatever the reason, the president spent the weekend swinging at "hardened Democrats" on Mr Mueller's team and "sanctimonious" former FBI Director James Comey, and celebrating Mr McCabe's unceremonious exit.

And so the president's strategy comes into shape. Paint his critics and investigators as anti-Trump, deep-state establishment forces and the entire inquiry as based on a biased and corrupt premise. The next step would be to claim any evidence of wrongdoing unearthed by Mr Mueller is irretrievably tainted.

That, of course, isn't much of a legal defence. In a war for public opinion, however, it's a place where his side could dig in.

Why was McCabe fired?

Mr McCabe had been under internal investigation by the FBI and had already stepped down from his deputy post in January pending the review.

He was sacked just two days short of his 50th birthday on Sunday, when he was expected to retire with a federal pension.

Attorney General Jeff Sessions said the "extensive and fair investigation" had concluded that Mr McCabe "made an unauthorised disclosure to the news media and lacked candour - including under oath - on multiple occasions".

Image copyright Getty Images Image caption The White House said it left the decision to fire Mr McCabe (right) to Mr Sessions (left)

Although the decision to fire Mr McCabe was made by Mr Sessions, Mr Trump had criticised him for months.

He has publicly pointed to donations that Mr McCabe's wife, a Democrat, received from a Clinton ally when she ran unsuccessfully for the state Senate in 2015 as evidence that Mr McCabe was politically biased.

He welcomed the news of his dismissal almost immediately after Mr Sessions announced it, calling the move a "great day for democracy".

What could the memos say?

News that Mr McCabe had kept records of his conversations with Mr Trump at the time he was acting FBI director emerged on Saturday.

US media say the memos will support Mr Comey's account of the circumstances of his dismissal last May.

Media playback is unsupported on your device Media caption Comey's most revealing moments

Mr Comey has testified that Mr Trump had asked him for his "loyalty" and requested he drop an inquiry into his disgraced former National Security Adviser Michael Flynn.

He, too, has said he kept contemporaneous notes of his dealings with the president.

In a statement responding to his firing on Friday, Mr McCabe vehemently denied wrongdoing.

"I am being singled out and treated this way because of the role I played, the actions I took, and the events I witnessed in the aftermath of the firing of James Comey," his response said.

The statement alleges that the justice department report recommending his firing was "accelerated" after he indicated that he would corroborate Mr Comey's version of events.

On Saturday Mr Comey - who is due to release a book - said Americans would soon be able to judge for themselves "who is honourable or not".