WASHINGTON — President Donald Trump on Thursday loosened enforcement of a tax-code provision separating politics from the pulpit, signing an executive order that he said takes several steps to “defend the freedom of religion and speech in America.”

The order limits the reach of the Johnson Amendment, under with houses of worship and charitable organizations risk losing their tax-exempt status for promoting or opposing a political candidate.

Trump had vowed on the campaign trail to protect religious liberties.

He said in February he would “totally destroy” the amendment. A repeal would require congressional action.

“For too long, the federal government has used the power of the state as a weapon against people of faith, bullying and even punishing Americans for following their religious beliefs,” the president said in the White House Rose Garden, signing the order at event marking the National Day of Prayer. “No one should be censoring sermons or targeting pastors.”

The order also offers unspecified “regulatory relief” to groups — such as the Little Sisters of the Poor — that faced fines and other repercussions for defying an Obamacare mandate to provide contraceptives to their employees. The judicial system already has scaled back the mandate.

advertisement | advertise on newsday

The order additionally directs the Justice Department to look into further federal protections of religious freedoms.

The final document was narrower in scope than previously leaked drafts, one of which included a provision permitting groups to deny services to individuals, including those in the LGBT community, on the basis of faith.

The conservative Christian group, Alliance Defending Freedom, based in Scottsdale, Arizona, said the executive order didn’t go far enough, calling it a “beginning, not an end.”

The American Civil Liberties Union said it would not sue over a measure that is largely symbolic and “merely provide a faux sop to religious conservatives.”

The nonpartisan Washington, D.C.-based Interfaith Alliance also said Trump was appeasing the religious right, noting that: “Faith leaders are already free to address politics, they just can’t use tax-exempt dollars for partisan politics.”