NEW YORK (AP) — A provision that would have freed churches to make political endorsements has been dropped from the Republican tax overhaul, dashing the hopes of a segment of religious conservatives on what has been a key issue to the Trump administration.

Advocacy groups on opposing sides said Friday they expect lawmakers to keep trying to loosen rules over partisanship in the pulpit, even as this latest effort has reached a dead end.

Conservative groups such as the Family Research Council and the Alliance Defending Freedom have for years sought to abolish IRS rules that bar electioneering by houses of worship and other charitable groups. President Donald Trump pressed the fight on the campaign trail and in the White House.

Still, only Congress has the authority to repeal the restriction known as the Johnson Amendment. It was named for President Lyndon Johnson, who introduced the measure in 1954 when he was a Democratic senator from Texas upset about a few nonprofit groups that had attacked him as a communist during a Senate race.

Under the IRS regulations, churches and other nonprofits can engage in a wide range of activity related to public issues, such as advocating for certain policies. However, pastors and churches are not allowed to endorse a particular candidate in a sermon or during church services without potentially losing their status as an organization exempted by the government from paying taxes. Even so, the IRS rarely enforces the rule.

The latest repeal effort was tucked into the GOP tax bill.

The House eliminated the restrictions for houses of worship and all nonprofits. The Senate bill did not include the provision, prompting a negotiation as a House-Senate committee worked to blend the two separate tax bills into a final package. The Senate parliamentarian decided the provision did not meet a Senate requirement that all parts of the bill be related to the budget.

Many religious groups, including some Christian conservatives, want to keep the IRS restriction as is. They included the American Baptist Churches U.S.A., the Union for Reform Judaism, the Episcopal Church and the Seventh-day Adventist Church, which counts Housing and Urban Development Secretary Ben Carson as a prominent member.

The groups say repealing the provision could divide their congregations along political lines and fear potential pressure from congregants to endorse politicians.

"They seemed most concerned about what this would do to their houses of worship and the communities that they value so much," said Amanda Tyler, executive director of the Baptist Joint Committee for Religious Liberty. "They talked about how politically and ideologically diverse their church families are and how this could really tear at the heart of the community and both distract and divert them from the reason they come together as a church."

A February survey by the National Association of Evangelicals, which represents 40 denominations and thousands of churches, found 89 percent of evangelical leaders said pastors should not endorse politicians from the pulpit.

But Tony Perkins, president of the Family Research Council, said opponents want to keep "religious leaders and churches remain muzzled or at least intimidated into silence" and vowed to keep fighting "until we have legislatively corrected this injustice or found a remedy in court." Erik Stanley, senior counsel for the Alliance Defending Freedom, said, "this is one of president's campaign promises. We're hopeful he'll continue to do the right thing to continue to fix the Johnson Amendment." Trump had promised to "totally destroy" the Johnson Amendment. Still, Stanley said, "ultimately, this issue resides with Congress."

The repeal had little public support. A survey of registered voters this past fall by the Program for Public Consultation at the University of Maryland found overwhelming majorities of Democrats and independents, and a large majority of Republicans, opposed easing the restriction. Campaign finance groups warned the change could have far-reaching implications, turning churches into tools for secret campaign spending.

Despite the tax bill failure, Tyler is watching for language on the IRS rules to be inserted into other legislation, such as end-of-year budget measures. A stand-alone bill would need 60 votes to pass the Senate, requiring support from Democrats, which is unlikely.

Sen. James Lankford, an Oklahoma Republican who pushed to abolish the restriction, said the current rules keep tax-exempt organizations in "constant fear that they might have crossed a line."

Still, Rep. John Faso, a New York Republican, said he was happy the prohibition was preserved. "Endorsement of candidates isn't why most people go to religious services," Faso wrote on Twitter.

___

This version corrects that Tyler's title is executive director, not president.