Hilary Krieger is an editor in The Washington Post’s editorial department. Follow her on Twitter: @hilarykrieger.

I used to be a Vincent Gray skeptic. I moved to the District three weeks before Adrian Fenty became mayor in 2007, and I watched as the city’s struggling schools improved, violent crime dropped and rejuvenated neighborhoods flourished under his watch. When Gray criticized Fenty and then succeeded in pushing him out four years later, I worried that the city would decline. Instead, test scores have continued to go up, crime has fallen even more and the local economy has surged forward. Gray won me over.

Then came the revelations that the success of Gray’s 2010 campaign could’ve been due to more than good stump speeches. Among other accusations of impropriety, a donor has pleaded guilty to setting up a $650,000-plus illegal fund to help Gray’s cause. Another one bites the dust, I thought.

There’s no doubt that corruption is reprehensible. It’s part of the reason the city got into the mess it did in the 1980s and 1990s. But in pondering Gray’s fate, I wondered: Is it really in voters’ best interests to disqualify candidates, no matter the good they’ve done, because of a corruption scandal or two?

Most voters think it isn’t. In fact, they’re often willing to overlook some missteps if a political leader has otherwise furthered the public good, especially if that leader is well-liked or the other candidates seem worse. Which is why Gray just might win the Democratic mayoral primary on April 1 — and why Republican New Jersey Gov. Chris Christie might still have a good shot at the party’s 2016 presidential nomination.

Sure, Gray and Christie are tied to some pretty nasty scandals: for the mayor, the illegal “shadow campaign,” and for the governor, those infamous traffic problems in Fort Lee, N.J. Both have denied knowledge of or involvement in the incidents, but that hasn’t kept them from being blamed.

Yet these leaders have been two of the more effective and popular chief executives around, which may help them weather these road bumps. The Philadelphia Inquirer’s editorial board, not exactly a place rife with Republican sentiment, endorsed the governor in October (before Bridge-gate broke), writing that “through pragmatism, bipartisanship, and executive skill, Chris Christie has earned a second term.” The paper pointed to Christie’s work with Democrats to “put the state’s budget and pension funding on a better track,” his deft handling of Hurricane Sandy relief efforts and his investment in higher education. Christie went on to trounce his Democratic competitor on Election Day.

Gray, for his part, has presided over the city’s “improving schools, bustling economy, active development, reduced unemployment rate and other signs of fiscal health,” as Afro.com put it recently. While his predecessors helped create that climate, Gray has made tough decisions to try to keep things on track, including promoting Kaya Henderson, onetime deputy to divisive reformer Michelle Rhee, to be schools chancellor, and vetoing a living-wage bill that threatened to torpedo Wal-Mart’s plans to open new stores and add jobs in the District. Though Gray’s numbers have taken a hit, he remains well­positioned to win in April. (He has vowed to stay in office even if charges are brought against him.) A poll released Friday put Gray in a tie for first place and previous polls have showed him as the leading candidate. A late-February surveyfound that 71 percent of residents think the District is on the right track.

Christie’s support has also dropped, but it’s starting to stabilize in some areas. A Rutgers-Eagleton poll this month found that more than half of voters still see him as a “strong” leader, while the negative reaction to the bridge scandal is beginning to ebb. (Not surprisingly, he does better among Republicans; partisans tend to take a kinder view of missteps.)

There is a long tradition of Americans looking past the misdeeds of leaders who provide good stewardship, from Presidents Ronald Reagan (Iran-contra) and Bill Clinton (impeachment) on down. And often that comes down to jobs, dollars and sense. Larry Sabato, of the University of Virginia Center for Politics, explains, “Because the economic expansion was so strong, and Reagan often appeared to be disengaged, [voters] preferred to believe Reagan didn’t know what was going on rather than accept that he was trying to trade arms for hostages.” And Clinton, he notes, oversaw a great economy.

Being liked helps, too. Take Buddy Cianci, the former mayor of Providence, R.I., who was sent to prison for five years on racketeering conspiracy charges. He now might make a political comeback, in part because he presided over Providence’s renaissance and the revitalization of its downtown, as a local news outlet observed — but also because he’s so darn personable.

“People just loved the guy, even when they realized he was guilty of corruption,” Sabato says. “It’s very human. We tend to excuse faults in our close friends and family members we like that we wouldn’t tolerate in less-appealing individuals.”

Then there’s the way politicians react to getting caught. Sen. John McCain (R-Ariz.) overcame the “Keating Five” scandal of the 1980s — in which he and other senators improperly interceded with federal bank regulators on behalf of a campaign donor — in large part because of his response.

“He embraced reform,” the Sunlight Foundation’s Lee Drutman says of the senator, who went on to literally put his name on campaign finance regulations. “People who manage scandals well do so if they own it and say, ‘I made a mistake, and I’m going to move forward.’ ” (That approach doesn’t seem likely to help Christie or Gray, given their emphatic denials of any role in the wrongdoing.)

Of course, having a strong record, being likable and apologizing aren’t always enough. Former Virginia governor Bob McDonnell compiled as many accomplishments as Christie and Gray: The Washington Post noted that during his tenure, which ended in January, McDonnell struck a landmark transportation-funding deal, reformed Virginia’s underfunded pension system, held down college tuition and preserved the state’s bond rating, leading Republicans and even some Democrats to regard him as an “excellent state executive.” Except for one thing: federal charges related to tens of thousands of dollars in gifts and loans that McDonnell and his wife allegedly received from an influence-seeking businessman, which have doomed his national political aspirations.

Being indicted can do that — especially if you’re accused of using your office to fill your pockets. This is generally the type of crime voters punish more than any other, according to Scott Basinger, a University of Houston political scientist who studied more than 250 members of Congress involved in scandals. He found that 40 percent of the scandal-tainted lawmakers lost their seats or bowed out — meaning the majority survived.

Scandals in which politicians use their power to stay in office or expand their reach — Basinger cites Bridge-gate as an example — “tend to receive no response from the public.” These cases, which would include Gray’s as well, are often viewed as politics as usual; plus, they can be too convoluted for the public to easily follow.

Since Watergate, though, some kinds of abuses have decreased. The Justice Department reports that, in the past two decades, the combined number of prosecutions for public corruption at the federal, state and local levels is down more than 20 percent. “The blunter, more obvious forms of corruption are on the decline,” Sabato notes, recalling the specter of congressmen accepting suitcases stuffed with money a la the Abscam scandal depicted in “American Hustle.”

Watergate was so damaging that it helped spark a clean-government movement that ushered in transparency laws, campaign finance reform and, eventually, a ban on congressional earmarks. In the process, and partly because of more intense media scrutiny of government, much of the backroom dealmaking became harder to do and more identified with nefariousness. Even if voters can be forgiving, the law and the news media often are not.

Voters’ overlooking corruption clearly has some serious costs — encouraging even worse behavior and eroding trust in government, for starters. But a single-minded focus on rooting out corruption can also have unintended negative consequences — for instance, the layers of regulations and mandated disclosures, such as releasing tax forms, can trip up even capable public servants.

Consider Tom Daschle. The former Senate majority leaderhad to withdraw from consideration as secretary of health and human services after he disclosed that he hadn’t paid taxes on a car-and-driver service provided by a friend and business associate. He also had around $80,000 in untaxed consulting income and took some charitable deductions for organizations that didn’t qualify. Watching the problems that have plagued the rollout of the Affordable Care Act under Health and Human Services Secretary Kathleen Sebelius, it’s hard to think that the country has been better off for having disqualified Daschle from service.

Just as problematic as those who are needlessly nixed are those who are scared off from running in the first place. “We’re ensnaring a lot of people in borderline gray areas of corruption,” says John V.C. Nye, an economics professor at George Mason University. “You’ll deter a lot of good people,” he warns, “if they feel the rules about misbehavior are both overly extensive and arbitrary.”

There’s another potential cost: the ability to get things done. “When you take away the tools that lend themselves to corruption, you also take away the tools that make it possible to govern,” says Jonathan Rauch, a senior fellow at the Brookings Institution, who has written extensively on corruption. “Something like what Christie’s people did looks more like traditional machine politics, which is ugly, unfair, corrupt and arguably sometimes necessary.”

Those unfair and corrupt practices — such as favoring certain groups and intimidating dissenters — are precisely the ones that can build a base of loyal followers and that can be necessary for getting results in a fractious system. Which, in turn, can encourage constituents to look past some unsavoriness.

Barbara Morgan, for one, still plans to vote for Gray. The civic leader from Ward 7told The Post that she is “more enthusiastic” about the mayor now than when he first ran in 2010 because of his focus on education and redevelopment. “All these other people are out here trying to get his job, but what have they done?” she said. “At least Vince has a record to run on.”

Rauch thinks a lot of District residents will see it that way.

“Voters are smarter than the pundits,” he says. “Look for Gray to get reelected.”

Twitter: @hilarykrieger

Read more from Outlook, friend us on Facebook, and follow us on Twitter.