The Internal Revenue Service was absolutely correct to look into the abuse of the tax code by political organizations masquerading as “social welfare” groups over the last three years. The agency’s mistake — and it was a serious one — was focusing on groups with “Tea Party” in their name or those criticizing how the country is run.

The IRS should have used a neutral test to scrutinize every group seeking a tax exemption for “social welfare” activity, Democrat or Republican, conservative or liberal. Any group claiming tax-exempt status under Section 501(c)4 of the internal revenue code can collect unlimited and undisclosed contributions, and many took in tens of millions. They are not supposed to spend the majority of their money on political activities, but the IRS has rarely stopped the big ones from polluting the political system with unaccountable cash.

Last year, we supported the IRS in aggressively asking Tea Party groups seeking this special tax status to prove they were not political activists. We urged it to be just as tough on groups already claiming 501(c)4 status — like Priorities USA, a Democratic group founded by former White House aides, as well as Karl Rove’s Crossroads GPS group and Americans Elect, a third-party group — as on Tea Party chapters seeking tax exempt status.

Unfortunately, it appears the IRS looked only at conservative groups applying for the exemption, an inexcusable mistake given its power over individuals, nonprofits and corporations, and the potential for abuse. It’s important to point out, though, that this is a far cry from President Richard Nixon’s interest in intimidating his political enemies through selective audits of personal tax records. There is no evidence President Barack Obama knew about the audits by the IRS. The groups involved were seeking not to pay taxes on large amounts of income by claiming that they promote social welfare. No one has an automatic right to this tax exemption; those seeking one should expect close scrutiny from the government to ensure it is not evading taxes.

For many years, however, the IRS hasn’t provided it. Democratic groups were the first ones to start abusing their social-welfare tax status in the 2004 election; the Republicans followed suit and became the biggest players in this field beginning in 2008. Far bigger than any Tea Party group, Crossroads GPS nakedly violated the tax code by spending tens of millions on behalf of Republican candidates, claiming it wasn’t political because it ran only “issue ads.” It never lost its tax exemption.

In 2011, when the head of the agency’s tax-exempt division, Lois Lerner, heard about Tea Party applicants being singled out for review through keyword searches in applications, she ordered that the focus be broadened to all political or lobbying organizations seeking such an exemption, The New York Times reported. Agency employees didn’t seem to get the message and kept the focus, wrongly, on conservative groups.

Obama said on Monday that he learned of the practice only when the public did late last week, and called it “outrageous.” He promised to take action against those involved — and needs to find out whether any political appointees ordered the practice or knew of it.Inevitably, the stumble by the IRS will now be used by the Republicans as a point of attack. They are gleefully promising months of hearings, and the National Republican Congressional Committee is already trying to tarnish Democratic lawmakers with what it calls “the Obama administration’s use of the IRS as a political tool.”

This will serve as the perfect distraction from issues, like the budget, gun control or immigration reform. And it will probably prevent any real progress on campaign finance reform, which in turn will make it vastly more difficult for the IRS to prevent abuse of the tax code.