A provision that would have allowed churches to endorse political candidates without endangering their tax-exempt status was stripped from the final Republican tax bill because it ran afoul of Senate rules, according to a Democratic senator.

“I’m pleased to announce that Democrats successfully prevented the repeal of the Johnson Amendment from being jammed into any final Republican tax deal,” Oregon’s Ron Wyden, the top Democrat on the Finance Committee, said in a statement. “I will continue to fight all attempts to eliminate this critical provision that keeps the sanctity of our religious institutions intact, prevents the flow of dark money in politics, and keeps taxpayer dollars from advancing special interest biddings.”

The provision in question was part of the House tax bill, and would have repealed the “Johnson Amendment” that prevents churches from directly endorsing candidates or politicking.

It also would have allowed some political nonprofits to officially endorse candidates, according to campaign finance experts.

Republicans advanced the measure on the grounds that it would free religious institutions to engage in political speech. President Trump promised to repeal the Johnson Amendment on the campaign trail, a stance that was cheered by some religious right leaders but is viewed skeptically by many denominations.

Democrats had warned that repealing the amendment could further loosen campaign laws, and subject churches to pressure to engage in the political process.

Advocates of the policy in the House bill argued that it would not change much because it wouldn’t allow tax-exempt churches to devote funds to politicking.

Senate rules limit what can be included in the tax bill. Provisions that do not directly relate to spending or taxing can’t be included.