Donald Trump's former campaign manager Paul Manafort has had his bail revoked by a Washington DC judge and has been ordered to jail pending trial.

Robert Mueller, who is investigating alleged Russian election interference, accuses him of trying to tamper with potential witnesses before the trial.

Mr Manafort was accused of using encrypted mobile phone apps to contact people in breach of his bail terms.

He faces charges of tax fraud, money laundering, and illegal lobbying.

US District Judge Amy Berman Jackson said on Friday that Mr Manafort had "abused the trust placed in you" and treated the court proceedings as "just another marketing exercise".

"This is not middle school, I can't take his cell phone," she added, according to US media.

Mr Trump said it was "very unfair" and called it "a tough sentence", although Mr Manafort has not gone on trial yet.

In a separate development, Mr Trump's lawyer Rudy Giuliani said that there is a "good chance" that the president will decide next week whether he will sit down for an interview with Mr Mueller.

But the former New York mayor advised that Mr Trump should not co-operate, saying: "Why would he get interviewed in a corrupt investigation?"

Pardon me?

Analysis by Antony Zurcher, BBC News, Washington

While Paul Manafort is facing charges unrelated to his time at the top of Donald Trump's 2016 presidential campaign, his prosecution - and now his pre-trial imprisonment - is widely viewed as a means for the special counsel team to pressure the former Washington power broker to co-operate with the Russia meddling probe.

While other members of Mr Trump's orbit in Mr Mueller's spotlight have admitted guilt to lesser charges, Mr Manafort is one of the few holdouts. If found guilty, the 69-year-old could spend the rest of his life in jail.

On Friday morning, Mr Trump distanced himself from his former campaign aide. By the afternoon, however, he appeared to offer a lifeline, noting that his prosecution was "very unfair". That's the same kind of language the president has used in justifying pardons for former Arizona sheriff Joe Arpaio, Bush administration official Scooter Libby and conservative commentator Dinesh D'Souza.

Mr Trump's personal lawyer, Rudy Giuliani, was even more direct, telling a New York newspaper that the Manafort situation could eventually get "cleaned up" by presidential pardons.

That may be exactly what Mr Manafort is counting on.

What is Manafort charged with?

Mr Manafort's trial on charges of money laundering and illegal lobbying is due to begin in September.

He is accused of laundering more than $30m (£22m) and failing to disclose his lobbying efforts to the Department of Justice.

His other trial - on tax fraud charges - is due to start next month.

The indictments are not connected with allegations of collusion between Russia and the Trump campaign during the US election in 2016.

If Mr Manafort is convicted, he faces years in jail.

Last week, Mr Manafort and his aide, Konstantin Kilimnik, were charged with witness tampering.

Mr Kilimnik, who denies having ties to Russian intelligence, was a long-serving employee of Mr Manafort's political consultancy.

Mr Manafort, who resigned as chairman of the Trump campaign in August 2016, has been under house arrest since he was charged last October.

He had been confined to that Alexandria, Virginia home since his arrest, and was forced to wear a GPS monitoring device.

He was indicted after FBI agents seized documents from his home in a pre-dawn raid in July last year.

Who was Manafort accused of contacting?

According to Mr Mueller's motion, Mr Manafort tried to reach witnesses who could be called to testify about unlawful lobbying that he allegedly carried out on behalf of Ukraine's previous pro-Russian government.

He is said to have made tens of millions of dollars from a campaign to bolster that government's reputation within Europe and the US, but not to have registered this work.

Prosecutors provided the judge with a summary of contacts they said were made with potential witnesses between February and April this year using encrypted text messaging apps.

The communications were an "effort to influence their testimony and to otherwise conceal evidence", FBI Special Agent Brock Domin wrote in a separate declaration filed to the court.

Mr Manafort's lawyers said in a response filed with the court that his "limited communications" did not "reflect an intent to corruptly influence a trial witness".

The response added that it was not a crime for Mr Manafort "to communicate his view to others, especially when he is not aware of who the Special Counsel may call as witnesses".

How is the Mueller investigation going?

So far, four former Trump campaign officials have been indicted by Mr Mueller.

Besides Mr Manafort, they include Michael Flynn, the president's former national security adviser; Rick Gates, a former deputy campaign chair; and George Papadopoulos, a former foreign policy adviser.

None of the charges against them relate to alleged collusion with Russia.

Sixteen Russian individuals and firms have also been indicted for alleged meddling in the election.