Much to my surprise, I find myself sympathizing with the Internal Revenue Service. Tenderness toward that agency isn't my default position. I'm a British expat living in the United States, with retirement savings locked up in Britain and other cross-border entanglements that have sometimes caused my dealings with tax professionals to displace landscape photography as my main and most expensive pastime. Say "IRS" to me and watch my teeth grind.

On the other hand, I used to be a civil servant, so I also understand how stupid laws can create administrative chaos. The more I read about the scandal of the IRS and its scrutiny of conservative groups seeking tax-exempt status, the more convinced I am that the blame for this mess lies almost entirely with Congress.

Plainly, if IRS officials were systematically discriminating against conservative groups with the aim of harassing or suppressing them, that's outrageous, not to mention criminal. If this was going on at the direction or with the knowledge of the White House, then the scandal rises, of course, to Watergate proportions. But there's no evidence of any such system or conspiracy, and the idea seems improbable. What we do have, though, are tax laws so complex, and so muddled with the regulation of political spending, that straightforward enforcement is almost impossible.

The rules controlling tax-exempt status for any kind of nonprofit group are bewildering enough. The intersection of these rules with equally arcane campaign-finance laws raises the problem to a new level. Congress made the really big mistake in all this by mixing the two. Administration of the tax code should be kept separate from regulation of money in politics.

The controversy centers on 501(c)(4) nonprofit groups. This designation denies groups the main benefit of ordinary charitable status - the right to collect tax-deductible contributions - but provides some other tax advantages. It also allows unlimited political lobbying (which is restricted for charities) and some electioneering (which charities can't do at all). Most important when it comes to explaining why the designation has proved popular, 501(c)(4)s don't have to disclose their donors.

Congress, not the IRS, decided to condition that last and most precious benefit on tax status. There's no logical connection. Political organizations are typically not-for-profit enterprises, whether they're campaigning on issues or supporting or opposing candidates. They don't exist to make money, so the taxes they might or might not pay aren't the point. If Congress wants to regulate their activities - for instance, by requiring them to disclose donor names - that shouldn't turn on whether the IRS has recognized them as tax-exempt.

A prominent line of commentary on this issue is that political organizations have been masquerading as social-welfare organizations, which is what 501(c)(4)s are loosely called, and improperly avoiding tax. This is wrong twice over. In a democracy, political organizations are social-welfare organizations: They qualify in the necessary sense that they are devoted to advancing (their idea of) social welfare. Because they don't exist to generate surplus income for distribution to owners, the tax issue is secondary.

Congress can choose to give different kinds of social-welfare organizations different kinds of tax advantages. If it wants to do that, it should write clearer rules, and not force the IRS to exercise discretion over issues such as some electioneering is all right, but not too much. The tax status, whatever it's deemed to be, should be irrelevant to the regulation of money in politics - in this case, the disclosure of donors. That's an entirely separate matter. The IRS should have nothing to do with it. Regulating money in politics is the job of the Federal Election Commission.

It wouldn't hurt, in my view, to abolish the 501(c)(4). It's a needless complication. Congress should say you can be a charity or a political organization, but not something in between. The Sierra Club or the political arm of the National Rifle Association - two prominent 501(c)(4)s - would have to choose whether to be charities, with the limits that imposes on lobbying and campaigning, or 527 issue-advocacy groups, with the disclosure obligations that entails.

By itself, that wouldn't achieve the separation between rules on taxes and rules on campaign financing I'm suggesting, but it would be a step in the right direction. It would also make the IRS's job a bit easier - and, I'm for that.

Clive Crook is a Bloomberg View columnist.