WASHINGTON — President Trump plans to mark National Day of Prayer on Thursday by issuing an executive order that makes it easier for churches and other religious groups to actively participate in politics without risking their tax-exempt status, several administration officials said.

Taking action as he hosts conservative religious leaders Thursday morning, Mr. Trump’s executive order would attempt to overcome a provision in the federal tax code that prohibits religious organizations like churches from directly opposing or supporting political candidates.

The move is likely to be hailed by some faith leaders, who have long complained that the law stifles their freedom of expression. But the order falls short of a more sweeping effort to protect religious liberties that has been pushed by conservative religious leaders since Mr. Trump’s election.

The Run-Up

The podcast that makes sense of the most delirious stretch of the 2016 campaign.

Many clergy members say they do not want to endorse political candidates from the pulpit because it could split their congregations and distract from their religious messages. This appears to be the case even among evangelicals, although it is Mr. Trump’s conservative evangelical advisers who encouraged him to address the issue.

It was unclear Wednesday whether Mr. Trump also planned to issue a separate order that would exempt some religious organizations like churches from Obama-era regulations requiring protections for gay men, lesbians and others.

A coalition of evangelicals, Roman Catholics, Mormons and Orthodox Jews has been eagerly awaiting a so-called religious liberty order, which they also hope will exempt religious entities from providing their employees with coverage for contraception in their health care plans.

Several conservative religious leaders said they expected Mr. Trump to issue such an order. But numerous White House aides declined to say whether the president planned to make such an announcement on Thursday alongside the executive order on political participation by churches.

Mr. Trump seized on the issue of limited political activism by religious leaders during the presidential campaign, winning cheers at rallies when he proclaimed that the tax code provision, known as the Johnson Amendment, denies pastors their right to free speech during elections.

“I will get rid of and totally destroy the Johnson Amendment and allow our representatives of faith to speak freely and without fear of retribution,” Mr. Trump promised at the National Prayer Breakfast in early February, just days after taking office.

It is unclear exactly how the executive order will get around the tax code provision, since eliminating it would require legislation by Congress.

But faith leaders who have had discussions with White House officials about the issue said Mr. Trump could direct the Internal Revenue Service not to actively investigate or pursue cases of political activism by members of the clergy.

Such a directive might be quickly challenged in court. But in the meantime, pastors could feel freer to actively participate in coming elections without fear of being investigated and having their tax-exempt status revoked by the federal government.

“He could say something like, ‘I’m instructing the I.R.S. to respect the rights of religious institutions to participate in the public square fully,’ ” said Richard W. Garnett, a law professor at Notre Dame and an expert in church/state issues.

“That might be symbolic,” he said, or it might in effect instruct the I.R.S. to “carve as wide a berth as possible” and allow churches and other houses of worship to participate openly in campaigns for political candidates without any repercussions.

Interactive Feature | Get the Morning Briefing by Email What you need to know to start your day, delivered to your inbox Monday through Friday.

Churches and clergy are free to speak out on political and social issues — and many do — but the Johnson Amendment served to inhibit them from endorsing or opposing political candidates.

Under the Johnson Amendment, houses of worship that do endorse candidates are supposed to be investigated by the I.R.S. and could lose their tax exemptions. It is impossible to know how many churches have been targeted by the I.R.S. over the years because the agency does not make investigations public.

However, only one church is known to have ever lost its tax-exempt status for partisan politicking, and that was in 1995, said Rob Boston, director of communications at Americans United for Separation of Church and State. The Church at Pierce Creek in upstate Conklin, N.Y., lost its tax-exempt status after taking out full-page advertisements in two newspapers warning Christians against voting for Bill Clinton for president in 1992 because of his stances on abortion, homosexuality and contraception. A federal court upheld the decision in 1999.

Mr. Trump was scheduled to have dinner with a group of religious leaders in the Blue Room at the White House on Wednesday evening before the Rose Garden ceremony marking the annual prayer day on Thursday morning.

Many of those religious leaders had hoped for more from Mr. Trump after a draft of a religious liberty executive order surfaced in early February.

That order would have allowed churches, religious colleges and some privately held corporations to stop providing contraceptive as part of the insurance they offer to employees if doing so offended their religious beliefs.

The draft order also would have allowed adoption agencies that do not believe in placing children with same-sex couples to avoid doing so; hospice providers to refuse visitation to the same-sex spouse of someone in their care; and housing programs that receive federal funds to refuse to accept a gay, lesbian or bisexual teenager into the program.

Constitutional experts who read an early version of the executive order, which was leaked to The Nation magazine, were stunned that it was so sweeping. It defined religious organizations as any entity operated for religious purposes — even if the purpose is not primarily or exclusively religious. That could include schools, charities, hospitals and clinics, and nonprofit groups — not just houses of worship. It also defined “religious exercise” broadly, as including all aspects of religious belief and practice.

It said that all executive branch agencies should insure that religious organizations and individuals should not be forced to forfeit their religious beliefs when they receive government grants or contracts, take a job, employ others or otherwise interact in the marketplace or with federal, state or local governments

Conservative faith leaders, who fiercely supported Mr. Trump’s candidacy in last year’s election, have pushed for the executive order as a way of reversing regulations and policies adopted during President Barack Obama’s administration. The faith leaders said Mr. Obama’s rules forced religious people and institutions to violate their deeply held beliefs.

Despite reports at the time that the religious liberty executive order was imminent, Mr. Trump never announced it. But on Wednesday, in anticipation that Mr. Trump might revive the order, civil liberties groups denounced it as blatantly unconstitutional and said it would amount to a “unprecedented license to discriminate.”

Several groups, including the American Civil Liberties Union and the Human Rights Campaign, vowed to immediately file a federal lawsuit challenging the executive order if it is announced.

“Freedom of religion does not give people the right to impose their beliefs on other, harm others, or to discriminate,” said Sarah Warbelow, the legal director at the Human Rights Campaign.

Conservative religious groups have been pressing for protections as the movement for gay equality gained traction and as discrimination against gay people became a concern among the broader public. The Supreme Court decision legalizing gay marriage only intensified the clash.

Ryan T. Anderson, a senior research fellow at the Heritage Foundation who specializes in religious liberty, said he had not seen a text of the executive order. But he said he expected that “it will at least be a good first step, and at the very least send a signal that the Trump administration is going to try to take seriously the concerns that Americans have had about their free exercise of religion.”