Brazil has Operation Lava Jato (Car Wash), an expansive investigation into bribery and corruption that has dragged dozens of legislators — and former President Lula da Silva — into court. South Africa’s President Jacob Zuma has been ordered to repay hundreds of thousands of dollars spent to upgrade his private residence, supposedly to enhance its security — though the improvements included a swimming pool and a chicken run.

Brazil uses “investigating judges” in way that’s common in nations whose legal systems track those on the continent of Europe. A judge gets hold of a case — in Brazil, the current operation began as a small money laundering investigation — and then can pursue it to the judge’s heart’s content. South Africa uses an independent auditor to follow the money, and a prosecutor with wide powers to investigate high-level corruption who is protected from politics by the nation’s Constitutional Court.

Both systems have their flaws. In both nations, there have been credible claims that the investigations have become weapons in partisan battles — wielded by conservatives against the leftist supporters of former Presidents Lula da Silva and Dilma Rousseff, and by opponents of Zuma’s faction within the governing African National Congress.

Designing investigations into high-level misconduct is extremely difficult. Every nation has tough choices to make, and none has come up with a perfect solution — though it’s clear that the US system is uniquely bad.

The problems Donald Trump has created for himself have put into motion the US version of the investigations in Brazil and South Africa. We are watching our political system contort itself as politicians and bureaucrats search for a credible way to investigate the depth and nature of his campaign’s connection with the government of Russia.

None of the choices we have will solve everything. Will the new FBI director have the credibility and clout to run the investigation? Should he or she, instead, insist that Attorney General Jeff Sessions appoint a special prosecutor — who would still report to Sessions? If Congress opts instead for an independent commission, it would have to decide how to choose members, and how much power the commission would have to force people to talk if they didn’t want to.

The US system for investigating high-ranking officials seems all but designed to generate political distrust

A well-designed investigative system must ensure that the public has confidence in the investigation and its outcome. But if the Justice Department decides not to bring charges against leading political figures — such as, let’s say, Hillary Clinton — lots of Republicans and lots of Democrats have to be persuaded that it’s not a cover-up. (Remember Michael Flynn leading the “lock her up” chant?)

If the prosecutors go ahead with charges, Republicans and Democrats have to be convinced that it’s not a partisan witch hunt. (Think Kenneth Starr here, who ran across Bill Clinton’s sexual adventures while investigating what turned out to be a nothingburger about the Clintons’ real estate investments.)

To be removed from office, Trump would have to be impeached by a majority of the House of Representatives, and then put on trial in the Senate, where two-thirds would have to vote to convict him. And according to the Constitution, impeachment leads to removal but doesn’t automatically produce a criminal conviction. Formally, a president who is removed from office via impeachment could be charged in a separate criminal proceeding. But if things ever got to that point, we can be pretty sure that the new president would do what Gerald Ford did: issue a pardon to the former president, so that government could get on with the daily work of governing.

Nations with new constitutions have started to write into them provisions dealing with what the South African constitution usefully calls “institutions supporting constitutional democracy” — bodies whose job is to investigate charges of official wrongdoing. They try to ensure public confidence by making the institutions both independent of direct political control and somewhat accountable to the public: independence to guard against cover-ups and accountability to prevent overzealousness.

The designs vary among nations, but the better ones give civil society organizations a role in choosing investigators (unsurprisingly, I’m partial to ones that give law professors and political scientists a seat at the nominating table). They also give the investigators fixed and fairly long terms. The constitution Tunisia adopted after the Arab Spring provides for a “Good Governance and Anti-Corruption Commission,” with several members serving nonrenewable six-year terms.

The institutions supporting democracy are chosen in ways that closely resemble the ways in which members of the nations’ constitutional courts are chosen. Many nations have gravitated toward judicial nominating commissions with some politicians, some judges, and a majority of members from civil society — bar associations, universities, and public interest NGOs.

It’s no surprise that similar nominating commissions are used for both anti-corruption institutions and courts: Courts are the paradigmatic institutions supporting democracy. (There may be a lesson here for how the US selects judges too.)

In contrast to the situation in other countries, the US has a jerry-rigged anti-corruption system

Perhaps because we wrote our Constitution more than two centuries ago, it doesn’t set out principles for investigating high-level corruption. It’s worth quoting Thomas Jefferson: Referring to the Constitution’s drafters, Jefferson wrote in 1816, the drafters’ generation “deserved well of the country. It was very like the present but without the experience of the present; and 40 years of experience in government is worth a century of book reading.” Modern constitutions have drawn upon two centuries of experience. We should do what we can to draw on that experience too.

Because the US Constitution fails to outline agencies that might combat official corruption, we’ve jerry-rigged things instead. In the 1920s, we established a system in which the attorney general named an independent prosecutor. That’s how, a half-century later, Archibald Cox came to head the Watergate investigation.

The Saturday Night Massacre, when President Richard Nixon removed Cox, Attorney General Elliot Richardson, and Deputy Attorney General William Ruckelshaus, led Congress to adopt a statute requiring the attorney general to ask the courts to name a special counsel when credible allegations of high-level wrongdoing surfaced. The Supreme Court upheld that system, but it didn’t work well. The trigger for naming special counsels went off way too often, and special counsels proved to be ungovernable. Kenneth Starr’s investigation of Bill Clinton was a political disaster.

Now we’re back to the older system: When political pressure gets strong enough, the attorney general can name an independent prosecutor outside the ordinary lines of authority for federal prosecutors. That’s not a great design, but at the moment it’s what we’ve got.

The decision to name an independent prosecutor is inevitably made in a highly charged partisan setting, when everybody knows pretty much what the stakes are. We can’t guarantee independence and accountability except by making sure that the person chosen has the personal integrity to generate public confidence in whatever she or he does.

And, again, in a highly partisan world, such a person might be hard to come by: Republicans will be suspicious of an investigator with Democratic ties, and vice versa. Even worse, the only protection an independent prosecutor has is the honesty of the attorney general and president, who — as a matter of law — can fire such a prosecutor whenever they want. An independent prosecutor might have to keep looking over his shoulder to see how the president is reacting to the investigation.

The best options, given the current situation

Given the system we’re stuck with, how can we deal with this partisan dynamic in the case of Trump? First, find someone who really is a prosecutor. That’s one reason Kenneth Starr went off the rails. A former appeals court judge and solicitor general, he didn’t have the experience a prosecutor has in figuring when it’s worth looking into something and when it’s not. Second, find someone with a reasonably strong reputation among lawyers — not an obscure career assistant US attorney.

Finally, and I write this with some reluctance, find a prosecutor who has some mild Republican affiliations. That might give the investigation some credibility with Republicans inclined to support “their” team by making it less clear who they should root for. But only “mild” Republican affiliations, because the investigation has to be credible to Democrats as well.

One possibility is to look at the list of US attorneys initially appointed by George W. Bush who were held over into the Obama administration for a substantial time. At the moment, the example of Rod Rosenstein — the deputy attorney general who wrote a memo criticizing Comey’s decisions in the Clinton investigation — isn’t encouraging here. But I think there’s some chance that we’ll find out he was a straight shooter in the Comey episode who was manipulated by the president and the attorney general.

My proposal — to look for a Bush appointee — makes me slightly uncomfortable, because it fits a historical pattern that has deep partisan and ideological roots. That pattern emerges from the background when you look at the list of independent counsels and special prosecutors since Watergate. Investigators with Republican affiliations get to look into charges of wrongdoing by Democrats and Republicans, but Democrats don’t get to look into charges about Democrats. The pattern is modest, the numbers aren’t large, the partisan affiliations of several investigators are difficult to determine, and there might be reasons other than partisanship to explain it. But with all that, the pattern is there.

I think the reason is this: For several generations Republicans have said that Democrats don’t really respect the rule of law. Democrats, Republicans say, think that the law is whatever they happen to want — or that the law is “just politics” in another guise. Those arguments have penetrated deeply into public understanding. So, of course, the public impression comes to be that a Democrat can’t be fair when investigating anyone, Democrat or Republican. Republicans, in contrast, are deeply devoted to a politically neutral rule of law, or so they say. So they can investigate anyone.

Democrats have responded, basically, “So’s your old man!” They say that Republicans don’t follow the rule of law either. That argument, though, hasn’t worked. Justice Elena Kagan made the argument that Democrats should make: It’s “law all the way down,” she said at her confirmation hearings. She meant that every good lawyer and judge uses a range of arguments to support her conclusions, and every one of those arguments counts as “law.”

My Democratic-leaning friends scoff at that, but they shouldn’t. It is law all the way down, but we have to come up with ways of showing to the public that our idea of the rule of law is better than the Republicans’.

Nearly every hour brings new developments in the Comey (or Trump) affair, and what I’ve written might be outdated by the time it’s published. But whatever turns the investigation takes, it is clear that political developments will matter more than legal arguments. That’s the way our system was designed.

The key, therefore, is whether the Republican political firewall now protecting Trump breaks. At present, it seems to be holding, with a large majority of Republican voters supporting the president’s decision to fire Comey, and little beyond mild expressions of regret from Congress. My guess is that we won’t know the long-term repercussions of the firing — and, now, the revealing of classified intelligence to Russia — until June 21, after the election for Tom Price’s congressional seat. (Price left the House to become secretary of health and human services.)

If Democrat Jon Ossoff wins, we might see Republicans heading for the hills, jumping ship, or whatever your preferred metaphor is. Instead of supporting the president, they’d start pressing hard to get a serious investigation off the ground. If Ossoff loses, Trump will probably stagger through this episode until the next outrage.

No one can know how the politics of the current affair will play out. It is unfortunate that the way we’ve designed our system for investigating official misconduct makes politics more dominant than it could be. But it’s doubtful we’ll be able to design a better system while we’re in the middle of a crisis.

Mark Tushnet, a leading scholar of constitutional law and legal history, is the William Nelson Cromwell professor of law at Harvard Law School. He contributes to the blog Balkinization.

The Big Idea is Vox’s home for smart discussion of the most important issues and ideas in politics, science, and culture — typically by outside contributors. If you have an idea for a piece, pitch us at thebigidea@vox.com.