The FBI under Robert Mueller undermined public confidence in justice while James Comey nearly destroyed it completely, a new book claims.

Ex-FBI agent Mike German, a 16 year veteran of law enforcement, writes the former directors of the bureau turned it into a 'lawless law enforcer'.

In Disrupt, Discredit, and Divide: How the New FBI Damages Democracy, German says: 'The FBI has systemic problems that, left unchecked, make the bureau a threat to the very democracy it is intended to serve'.

In a damning history of the FBI, German claims that Mueller, who later became the Special Counsel in the investigation into Russian interference in the 2016 election, wanted to 'remake the FBI in his own image' with no room for dissent.

He threw out the safeguards that were brought in by the Church Committee in 1975 and brought about a 'new era of abuse' against citizens.

Mueller's FBI has silenced whistle-blowers and created many 'victims of the FBI' says German, who became an adviser to the American Civil Liberties Union (ACLU) after retiring and has written papers attacking the bureau.

Comey went further and 'dispensed with the illusion the bureau was impartial and apolitical' when he made his public comments about the investigation into Hillary Clinton's emails in 2016.

German claims that Comey breached a 'cardinal rule' of the FBI by commenting on a subject's uncharged behavior and his comments cast a 'cloud of illegitimacy' over Trump's presidency before he even took office.

The FBI under Robert Mueller undermined public confidence in justice while James Comey (pictured together in 2004) nearly destroyed it completely, a new book by ex-agent Mike German claims. He writes the former directors of the FBI turned it into a 'lawless law enforcer'

German claims that Comey breached a 'cardinal rule' of the FBI by commenting on a subject's uncharged behavior and his comments cast a 'cloud of illegitimacy' over Trump's presidency before he even took office

The bombshell book by German, which is out on September 10, is released at a time of historic tensions between the FBI and the White House.

President Donald Trump has claimed that he is the victim of an FBI-driven 'witch hunt' over the inquiry into Russian interference in the 2016 election.

The bombshell book by German, a 16 year veteran of law enforcement, is released at a time of historic tensions between the FBI and the White House

Trump fired Comey and his successor Andrew McCabe one day before his retirement, meaning he was not entitled to his pension.

Trump has also claimed that the genesis of the Russia inquiry was an abuse of process and that former FBI agents such as Peter Strzok, who was also fired after anti-Trump texts he sent became public, were out to get him.

German, who is now a fellow at the Brennan Center for Justice and is senior policy counsel at the ACLU, paints a disturbing picture of FBI overreach.

Much of his criticism of the FBI is from the left, such as its profiling of minorities and targeting of Muslims after 9/11.

However his warning of an out of control bureau, regardless of who the target is, should sound the alarm among Republicans.

German writes that in 2001 the FBI came under Congressional scrutiny after a string of failures such as the 1993 Waco siege.

The bureau 'slept through the tech revolution' and repeatedly tried to cover up its mistakes, earning scorn from the Senate Judiciary Committee.

Committee chairman Patrick Leahy accused the FBI of 'insular arrogance' while Senator Chuck Grassley said the FBI leadership placed a 'higher value on maintaining image rather than rooting out wrong'.

Mueller seemed like the perfect choice to fix the mess and the former Marine vowed to welcome constructive criticism and work with Congress to reform the FBI.

But a week after Mueller was confirmed, the 9/11 attacks happened and those promises turned to dust.

In a damning history of the FBI, German claims that Mueller (pictured in 2004), who later became the Special Counsel in the investigation into Russian interference in the 2016 election, wanted to 'remake the FBI in his own image' with no room for dissent

German writes that instead of focusing on what they knew about Al Qaeda, the Department of Justice let 'fear about what they didn't know' drive their response.

Mueller, who had condemned racial profiling weeks earlier, approved sweeping programs targeting Muslims and Arabs.

More than 1,200 Muslim and Arab men were detained for minor violations and 70 people were jailed under questionable terms because they could be material witnesses.

The FBI saw this as part of a wider 'disruption strategy' meant to target terrorist plots; essentially they had nothing so they had to 'disrupt everything'.

German writes: 'The FBI explicitly designed its disruption strategy to justify government action where no objective evidence demonstrating involvement in terrorism or violent crime exists, in order to prevent future plots that might never form.

'Because everyone is a potential future terrorist, this paradigm shift justifies prophylactic mass surveillance as the FBI can't predict what details of any particular person's life it might later find important.

'The enormous intake then necessitates systemic profiling to narrow the data down to a manageable set of suspects'.

According to German, Mueller publicly denied that the FBI had any forewarning of the 9/11 attacks as part of a ploy to get more power for the bureau.

FBI leadership described Al Qaeda as a shadowy enemy who was lurking in mainland America and could attack the country at any minute.

This justified 'unleashing the FBI from traditional legal and moral restraints in order to prevent the follow up attacks they predicted', German writes.

The strategy worked and Congress approved the USA Patriot Act, which was a 'wish list' of expanded authority for the FBI.

A week after Mueller was confirmed as director the 9/11 attacks happened. Mueller, who had condemned racial profiling weeks earlier, approved sweeping programs targeting Muslims and Arabs. The FBI saw this as part of a wider 'disruption strategy' meant to target terrorist plots; essentially they had nothing so they had to 'disrupt everything'. Pictured: Mueller applauding President George W. Bush in 2004

Congress loosened the Foreign Service Intelligence (FISA) act which would prove to be extremely controversial under Trump.

The FISA court was established by the Church Committee which demanded reforms after CIA and FBI abuses of power.

The hearings, which are carried out in secret, mean that the FBI has to justify to a judge why it should be allowed to put somebody under surveillance.

The loosened rules meant the FBI could 'surreptitiously father information about anyone it deemed 'relevant' to a terrorism or espionage investigation, rather than just predicated targets', German writes.

The book says: 'It removed the FISA ''primary purpose'' test so agents could more easily use the secret court system to gather evidence for use in criminal trials'.

It is likely that these looser rules would have helped Mueller during his investigations as Special Counsel and Comey when he was director of the FBI.

Trump has claimed that when the FBI wanted to wiretap his former foreign policy adviser Carter Page they did not even apply to the FISA court.

In tweets, Trump has asked if agents used the dossier prepared by former British spy Christopher Steele as evidence in the FISA hearing - and claimed if they did use the dossier, the application was bogus.

In 'Disrupt', German says that everything coming out of FBI leadership after 9/11 was a 'false pretense' to get new domestic spying authority from Congress.

The book says: 'They embraced a new mandate to transform the FBI from a law enforcement organization into a fully fledged domestic intelligence agency.'

Under Comey, who took office in 2013, the FBI quietly removed 'law enforcement' from its mission statement. It now reads: 'To protect the American people and uphold the Constitution of the United States'

German sees this as 'symbolic' of the change in the bureau which got worse under Comey.

Congress loosened the Foreign Service Intelligence (FISA) act which would prove to be extremely controversial under Trump. It is likely that these looser rules would have helped Mueller during his investigations as Special Counsel and Comey when he was director of the FBI

He writes: 'Predictably, expanding the FBI's powers without reforming its management problems only ensured a new era of abuse would unfold and made additional intelligence failures inevitable.'

The influx of new data meant that the FBI was overwhelmed with information which was not helped by Mueller's policy of 'no lead goes uncovered'.

German calls it 'terrible counter-terrorism policy' and resulted in thousands of what became known as 'Pizza Hut leads' because they routinely led to dead end addresses at to-go restaurants.

Mueller later admitted that he wasn't as 'familiar' with Al Qaeda and Osama bin Laden as he could have been.

But rather than surround himself with the right people, he was more interested in making the FBI the way he wanted.

German writes: 'The Senate Judiciary Committee's reform agenda was pushed aside as Mueller sought to make a more powerful and secretive FBI'.

'Disrupt' says that Mueller could have done more to stop the CIA abusing terrorism detainees by insisting FBI agents, who had more extensive training in interrogations, carry out the questioning of suspects.

German then turns his sights on Comey, criticizing his claim that he was allowed to breach long standing Justice Department rules about the director of the FBI commenting on an ongoing case, in this case the inquiry into Clinton's emails.

Comey's thinking was that former Attorney General Loretta Lynch was 'fatally compromised' after meeting Bill Clinton at Phoenix airport in June 2016.

German writes: 'The logic is that because one rule was broken, the rulebook was no longer operative and he could as a self-described ethical public leader, decide what the new rules were'.

German claims that Comey breached a 'cardinal rule' of the FBI by commenting on a subject's uncharged behavior. The effect on President Trump was that Comey's public comments cast a 'cloud of illegitimacy' over his Presidency before he even took office. Pictured: Trump and Comey in 2017

Comey's decision to publicly rebuke Clinton for being 'extremely careless' in how she handled classified information was a 'smear' and didn't give her the proper avenue to defend herself. The book says: 'Comey's actions arguably tipped the tightest presidential election in history.' Pictured: Hillary Clinton after losing the election in 2016

Comey's decision to publicly rebuke Clinton for being 'extremely careless' in how she handled classified information was a 'smear' against her without giving Clinton the proper avenue to defend herself.

After this, Comey's decision to publicly testify before the House Judiciary Committee was 'baffling'.

German's verdict on the Mueller report into Russian interference in the 2016 election is that it 'fueled partisan rancor'. He writes: 'The only thing clear in this sordid mess is that the American public deserves better'

Then, on October 28 2016, just 11 days before the election, Comey announced he was reopening the Clinton investigation using what German calls a 'contrived' duty to correct the public record.

But such an obligation was 'imaginary' and used it to undermine the FBI's 'reputation for objectivity'.

The book says: 'Comey's actions arguably tipped the tightest presidential election in history and case a cloud of illegitimacy over the Trump government even before it took office'

German's verdict on the Mueller report into Russian interference in the 2016 election is that it 'fueled partisan rancor'.

He writes: 'The only thing clear in this sordid mess is that the American public deserves better.

'We deserve to know that FBI investigations are based solely on objective evidence establishing a reasonable suspicion of criminal activity and free from political interference of any kind.

'The stain of the FBI's J. Edgar Hoover-era abuses should have served as a strong warning that public trust can be lost more easily than it can be recovered'.

German also states his belief that the FBI should have more vigorously pursued bank executives behind the 2008 financial crash.

In some of his most damning comments in the book, German writes that by targeting protesters and minorities and not white nationalists, the FBI contributed to a 'societal breach'.

German writes: 'I believe that the FBI has contributed to a breakdown of public trust in government institutions... the FBI widened the divide between us and them - the protected versus the suspected.

'When members of the public internalized that government institutions would not protect their rights and privileges, they had to decide which side they were on'.

Mike German's book Disrupt, Discredit, and Divide: How the New FBI Damages Democracy available on September 10.