Churches and other nonprofits long have been forbidden from endorsing political candidates. But erratic enforcement of the law has emboldened supporters of legislation in Congress that would end the restriction. Far from needing to be repealed, the ban on politics in the pulpit ought to be enforced more aggressively.

A bill sponsored by Rep. ­Walter Jones, R-N.C., would repeal a 1954 amendment to the tax code sponsored by then-Sen. Lyndon B. Johnson. The amendment says that churches and other so-called 501(c)(3) nonprofit organizations may not "participate in, or intervene in … any political campaign on behalf of (or in opposition to) any candidate for public office."

Jones' legislation seeks to restore the "First Amendment rights" of churches, but that's misleading. Churches may have a First Amendment right to endorse candidates, but there is no constitutional right to a tax exemption. Congress is free to condition such exemptions — which can be worth millions of dollars — on an agreement by churches and charities to refrain from partisan political activity. And it's the IRS' responsibility to enforce compliance.

Unfortunately, enforcement has been minimal, despite highly publicized protests in which some preachers have endorsed or opposed candidates by name during religious services, daring the IRS to sanction them. Paradoxically, the lack of enforcement is cited by some critics as a reason to repeal the law.

Not all critics of the Johnson amendment would abolish it. The Commission on Accountability and Policy for Religious Organizations, comprising religious leaders from several traditions, recently suggested that members of the clergy should be allowed to endorse candidates "in the context of a religious worship." But churches would still be barred from spending tax-deductible contributions on election activities.

The problem with that proposal is that a political endorsement from the pulpit is likely to be influential precisely because it occurs as part of a religious rite. The ban on such endorsements should remain, but the IRS needs to have clearer standards for determining when a preacher has crossed the line.