In the nearly seven months since Robert Mueller was appointed to investigate possible collusion between the Donald Trump campaign and Russia, he has already obtained two indictments and two guilty pleas. Paul Manafort and Rick Gates, the indictees, are back in court Monday, when their trial date could be set, and more charges could well be coming for other people in Trump’s orbit. But even as the investigation gathers steam — or perhaps because of it — there are increasing concerns about just how long Mueller will be able to keep his job.

The prosecutor serves under the authority of the deputy attorney general and could be asked to leave at any time. And external opposition could help grease the wheels for his departure. A growing drumbeat to this effect seems to be building on the right. Earlier this month, The Wall Street Journal’s editorial board wrote for the second time that Mueller is too “conflicted” to run the investigation and called on him to step down in favor of someone more “credible.” Fox News host Sean Hannity recently condemned Mueller’s investigators as “an extremely biased team of liberal crusaders,” and Newt Gingrich, who called Mueller a “superb choice” to run the investigation when he was appointed in May, is now attacking him as “corrupt.”

Then there’s the possibility that the president could simply lose patience with Mueller and order Deputy Attorney General Rod Rosenstein to fire him. Mueller reportedly subpoenaed information this fall on accounts held by the Trump family at Deutsche Bank — after Trump implied earlier this year that investigating his finances could spur him to consider dismissing Mueller.

Democrats, for their part, have been arguing for months that Congress needs to act to pass additional protections for Mueller. But our review of the history of special prosecutor investigations suggests that Mueller’s investigation is more secure than it might seem — and that more protections don’t necessarily produce more effective prosecutions.

Since the late 19th century, when a special prosecutor was used for the first time, public pressure alone has been sufficient to keep an investigation going, even when the president tried to intervene. Our analysis of the 30 investigations since 1875 shows that at first, special prosecutors were relatively rare and appointed only in response to very serious scandals. They were called on to examine diverse allegations involving government officials, all spurred by the perception that a conflict of interest would have kept ordinary prosecutors from conducting a fair investigation or might have driven someone powerful to intervene. In cases where the White House interfered anyway, public outcry saved the investigation.

It was only in the late 20th century that Congress decided that special prosecutors needed more protections from the executive branch and created the position of an independent counsel, which reported to a three-judge panel rather than the president or the attorney general. But the results of these enhanced protections for independence were so mixed that these legal safeguards were allowed to lapse after only 20 years.

“The system we have actually seems to work pretty well,” Josh Chafetz, a professor of law at Cornell Law School, said of the return to special prosecutors appointed by the attorney general. “In the few cases where a prosecutor has been fired, the blowback was so intense that a new one was appointed very quickly.”

In fact, the very first use of a special prosecutor demonstrates the limits of a president trying to stop an investigation. Ulysses S. Grant appointed John B. Henderson in 1875, just five years after the Department of Justice was founded, to look into what became known as the Whiskey Ring. This group of whiskey distillers, employees of the Treasury Department and Internal Revenue Service, and Grant’s friends and cronies were defrauding the government of millions of dollars in liquor tax revenues.

Embarrassed by negative press coverage of the scandal, Grant tapped Henderson to lead an investigation into the ring with the hope of deflecting criticism. But he ended up firing Henderson after Grant’s personal secretary was indicted and — even worse — Henderson raised questions about Grant’s own connection to the scandal. But the move was quickly condemned — one treasury official called it “a fatal blow” to the investigation — and the attorney general replaced Henderson with another prosecutor. Eventually, more than 100 people were convicted of tax fraud (although not Grant’s secretary, who was acquitted after Grant took the unusual step of serving as a defense witness on his behalf).

Over the next half-century, a handful of presidents appointed special prosecutors to deal with a select number of high-profile scandals. As with Grant, most were responding to public pressure. “It was a way to ease the heat coming usually from the media or from Congress,” said Katy Harriger, a professor of political science at Wake Forest University who authored a book on special prosecutors.

And those investigations were effective in taking down congressmen and Cabinet secretaries. For example, in 1903, Theodore Roosevelt’s attorney general named a special prosecutor who ended up convicting two members of Congress for helping timber investors illegally obtain government land in Oregon. (The Supreme Court eventually overturned one of the convictions.) In the 1920s Teapot Dome scandal, Warren Harding’s secretary of the interior became the first official convicted of a crime while serving in the Cabinet after special prosecutors discovered that he had been bribed to lease public land to oil companies.

With the exception of Henderson, none of the special prosecutors through the mid-20th century was dismissed by a president, but during that time, the special prosecutor was always theoretically vulnerable to the whims of the president.

This danger was cast into sharp relief in 1973, when Archibald Cox was appointed to be the special prosecutor in the Watergate investigation. Richard Nixon then ordered the attorney general to fire Cox after Cox tried to force Nixon to turn over secret recordings of Oval Office conversations. In that case, too, Nixon was forced to replace Cox with a new special prosecutor within a matter of weeks — and the firing did not slow the Watergate investigation’s progress.

But the upheaval was deeply disturbing to legislators. Four years after Nixon resigned, Congress passed a law that created the office of the independent counsel, which reported to a panel of judges and required the attorney general to recommend the appointment of an independent counsel whenever there were “reasonable grounds to believe that further investigation is warranted” on misconduct charges against government officials.

The result was that the number of special prosecutors ballooned in the 1980s and 1990s. From 1875 through 1978, there were seven special prosecutor investigations; under the independent counsel law, which lapsed in 1999, there were 20.

John Q. Barrett, a St. John’s University law professor who worked on the Iran-Contra investigation in the 1980s, said that many of these inquiries didn’t merit an independent prosecutor — for example, an investigation into allegations that two of Jimmy Carter’s White House aides had snorted cocaine at a New York club. In that case, in which no charges were brought, there was no reason to think the president would intervene. “They could have put four New York City cops on the case,” Barrett said.

“This big, noble statute turned into an overbuilt machine for investigating allegations that were pretty small fry,” he said.

During the next two decades, 12 of the 20 investigations under the independent counsel law did not result in any criminal charges — a sharp contrast with the earlier special prosecutor probes, which all resulted in indictments or large-scale resignations.

There were, of course, major political scandals investigated by independent counsels, but even these high-level inquiries were often criticized for their length and expense. Most special prosecutor investigations ended up costing taxpayers millions of dollars, often without appearing to justify their rapidly mounting price tag.

Special prosecutor investigation costs and results From January 1979 through Sept. 30, 2017 PRESIDENCY INVESTIGATION COST INDIVIDUALS CHARGED PLEAS AND CONVICTIONS PARDONS Trump Russia collusion (ongoing) $3.2m 4 2 0 W. Bush Valerie Plame leaks 2.6 1 1 0 Clinton Waco raid 15.5 0 0 0 Alexis Herman,

influence-peddling 6.0 1 0 0 Bruce Babbitt,

casino application 7.2 0 0 0 Eli Segal,

conflict of interest 0.6 0 0 0 Ron Brown,

selling plane seats 3.9 0 0 0 Henry Cisneros, perjury 24.4 6 4 2 Mike Espy,

accepting gifts 25.2 13 8 7 Whitewater, Vince Foster, Monica Lewinsky 79.7 20 14 4 Search of Bill Clinton’s passport files 3.1 0 0 0 H.W. Bush Sealed < 0.1 0 0 0 Samuel Pierce,

influence-peddling 29.4 18 16 1 Sealed 0.0 0 0 0 Reagan Lyn Nofziger,

improper lobbying 2.8 2 1 0 Iran-Contra 47.9 14 11 6 Sealed 0.1 0 0 0 Michael Deaver, perjury 1.6 1 1 0 Ted Olson,

obstruction of justice 2.1 0 0 0 Edwin Meese,

financial improprieties 0.3 0 0 0 Raymond Donovan,

mob ties 0.3 0 0 0 Carter Tim Kraft,

cocaine use < 0.1 0 0 0 Hamilton Jordan,

cocaine use 0.2 0 0 0 Showing presidencies during which the investigations began. Some defendants were indicted and later pleaded guilty, and some defendants were initially charged with one set of crimes and then indicted again on other charges. In both cases, only the first set of indictments and charges are included. Indictments of businesses are excluded. Two figures in the Iran-Contra scandal — Oliver North and John Poindexter — saw their convictions overturned on appeal. Lyn Nofziger’s conviction was also reversed on appeal, as was the conviction of Lance Wilson, who was part of the influence-peddling scandal under Samuel Pierce. I. Lewis “Scooter” Libby’s prison sentence was commuted by George W. Bush, although he still had to pay a $250,000 fine. Sources: Congressional Research Service, various news sources

Special counsel Kenneth Starr’s investigation of Bill and Hillary Clinton’s investment in a real estate entity called the Whitewater Development Company fell squarely into this category. The investigation officially launched in August 1994 to look at Bill Clinton’s dealings while he was a state official, and it resulted in charges for a wide range of Clinton associates, including the sitting governor of Arkansas. But Starr then expanded his inquiry to include a probe of White House aide Vince Foster’s death (after three years, Starr reaffirmed the conclusion that Foster had committed suicide), claims that the Clintons had fired aides in the presidential travel office to give jobs to their friends (no intentional wrongdoing was found), and an investigation of allegations that Clinton had encouraged Monica Lewinsky to lie about their affair under oath, which ultimately led to Clinton’s impeachment.

“It was becoming clear that when you freed the independent counsel from all checks — political and budgetary — they could keep expanding their purview kind of indefinitely,” Chafetz said. “There was a real sense that he (Starr) had lost perspective of what this investigation was supposed to be for and was pursuing Clinton personally.”

With the office of the independent counsel under fire — even Starr eventually turned on it, calling it “constitutionally dubious” — Congress chose not to renew it in 1999. The Department of Justice issued regulations instead providing for the appointment of a special prosecutor by the attorney general — a functional return to the pre-1978 status quo.

Since then, the regulations have been invoked only three times: in 1999, to investigate the FBI’s actions in the 1993 raid on the Branch Davidians in Waco, Texas (the special prosecutor criticized the way the raid was handled, but no charges were brought); in 2003, to investigate the leak of undercover CIA agent Valerie Plame’s name by the George W. Bush administration (Bush aide I. Lewis “Scooter” Libby, was convicted); and the Russia investigation this year.

Despite Democrats’ anxiety, Barrett said he’s confident that even if Trump did direct the deputy attorney general to fire Mueller — an order that Justice Department officials might be unwilling to carry out — the special prosecutor position wouldn’t stay vacant for long.

“Robert Mueller is widely perceived as a competent and credible law enforcement official,” Barrett said. “As long as he doesn’t do something to jeopardize that, Trump would have no justification for dismissing him. And if he did, he’d have to appoint an equally credible replacement, or there would be really catastrophic political consequences.”