The liturgy read in churches across America on Sunday said: “Blessed are those who are persecuted.”

What clergy said in many pulpits, reacting to President Trump’s most recent executive order: “Blessed are the refugees.”

The words of the Beatitudes — the nine blessings recounted in Jesus’ Sermon on the Mount — happened to be prescribed in the liturgical calendar used by Catholics and many Protestants for this week’s readings.

After Trump issued an order Friday temporarily barring refugees from seven Muslim-majority countries, clergy across the nation scrapped earlier sermons to build on the lesson and urge parishioners to stand up for what they see as a biblical call to care for “the stranger.”

But at some conservative churches, pastors and parishioners also voiced concerns about how to balance welcoming the stranger with preserving American security.

“We don’t want Christians to be afraid of reaching out to refugees,” said Brad Whitt, the pastor at Abilene Baptist Church, a 2,800-member Southern Baptist church in Martinez, Ga. Whitt said that Trump’s vow to improve the system for vetting refugees might eventually make churches more comfortable with helping them.

He said he supports Trump’s order “as long as it’s not a religious test.”

Meanwhile, the Rev. Roger Gench at the historic New York Avenue Presbyterian in Washington echoed other pastors across the ideological spectrum in treating the order as a Christian call to resist.

“It seems to me that as followers of Jesus, we can do nothing but to resist the actions that have taken place this week that target Muslims, immigrants and refugees,” he told his congregation.

“When [Jesus] talks about people who are mourning, think about the Syrian refugees whose lives have been devastated. When Jesus talks about those who are striving for justice, think about the mothers and fathers standing over the dead bodies of children,” preached Gench at the church that stands just three blocks from the White House.

The executive order calls for barring Syrian refugees from the United States indefinitely, and prohibits admitting any refugees from any nation in the world for 120 days. For 90 days, no citizen of seven majority-Muslim countries — even those who hold American green cards and have been living in the United States for years — will be admitted without a waiver.

In Roswell, Ga., the Rev. Eric Lee joined Gench and others, preaching at the United Methodist church Chapel Roswell that followers of Jesus “can’t just turn away and say I don’t care, or it’s not my problem.”

“Granted, for some people, that whole concept of being hospitable to strangers can be unnerving, scary. . . . Are we willing to take risks on behalf of our faith?” he asked. “Because practicing intentional, even radical hospitality toward strangers is inherent to the Christian ethic.”

At Manhattan’s Riverside Church, one of the most prominent pulpits in the country, the Rev. Amy Butler’s sermon on the Christian call to welcome immigrants drew repeated applause and a standing ovation at the end. “In the kingdom of God, we open our hearts and our hands; we make extra room at the table; we let the boat dock and the traveler clear customs and the children find safety,” she said, urging members to attend an afternoon protest in Manhattan.

While some clergy in the evangelical denominations that voted heavily for Trump in November criticized Friday night’s order, others remained supportive. The Rev. Franklin Graham, son of evangelist Billy Graham, said in an interview last week that the vetting process for refugees coming into the United States is not strong enough.

“It’s not a biblical command for the country to let everyone in who wants to come. That’s not a Bible issue,” he told the Huffington Post.

Evangelical leaders — including the National Association of Evangelicals’ World Relief organization and more than 100 prominent evangelicals who gathered at Wheaton College to discuss refugee issues in December — have largely denounced Trump’s executive order.

But many rank-and-file evangelicals probably support Trump’s plan even if their pastors do not, said Jerry A. Johnson, president of the National Religious Broadcasters.

“The minority opposition is being led by the elite political class or professional religious workers,” Johnson wrote in an email. “Not only are they out of touch with the Common Man, they are out of touch with the people in the pews.”

Evangelical attitudes are perhaps best reflected by a 2016 Southern Baptist Convention resolution that urged churches and families to welcome refugees while also calling on the government to “implement the strictest security measures possible” in screening them.

Scott Johnson, who teaches a Bible fellowship class at Abilene Baptist and said he voted for Trump because the president opposed abortion, agreed. “I don’t think there’s anything wrong with taking in people who love our country — and that’s what he’s trying to do. If they don’t love the country, why should we bring them here?”

Senior pastor Bill Hulse of Putnam City Baptist Church in Oklahoma City noted that times have changed since the 1970s when the church welcomed Vietnamese, Korean and other refugees with open arms. “Those factors that are in the refugee argument then are different from today,” he said.

Trump said that the new vetting system he plans to put in place during his 120-day stay on refugee admissions would prioritize religious minorities. In an interview with the Christian Broadcasting Network, he said he wanted to emphasize admitting more Christians from Syria and other majority-Muslim countries.

In a Washington Post/ABC poll in 2015, 78 percent of respondents favored equal consideration for refugees regardless of religious affiliation, while 18 percent backed special consideration for Christians.

Many Christian leaders reiterated this week that while they have long been concerned about persecution of Christians in the Middle East, they do not want Christians prioritized over Muslims.

“Any proposal that preferences Christians over Muslims as refugees makes Catholic leaders nervous because it feeds that narrative that this is a war between the Christian West and the Muslims,” said the Rev. Thomas Reese, a member of the U.S. Commission on International Religious Freedom.

Ace Stafford, a pastor at the nondenominational Church of the Highlands in Harrison, Tenn., said he was bothered by the idea of prioritizing Christians over Muslims. “To be discriminatory like that, it’s definitely treading on thin ice,” he said. “As a believer, I don’t think I should willingly say, ‘My doors are closed to you.’ ”

But members at his church questioned whether the United States should welcome Muslim refugees.

“They claim Islam is a religion of peace. But it’s not,” said David Ellis. “We are called to love . . . but we are also called to be wise as serpents and gentle as doves.” He said he felt the country needs “to be smart.”

A Pew Research Center survey in October found that 54 percent of American voters said the United States does not have a responsibility to accept refugees from Syria, while 41 percent said it does. Of those polled, 87 percent of Trump supporters said Americans don’t have to accept Syrians, compared with only 27 percent of Hillary Clinton supporters who said the same.

In Birmingham, Ala., Bishop Harry Seawright is in the latter camp. In his sermon, he compared the plight of today’s refugees to the Israelites fleeing Egypt in the Bible and of civil rights activists who were demonized in the 1960s.

“Moses and the children of Israel were oppressed just because they were different. God hears the cries of those suffering,” said Seawright, who preached at St. Paul African Methodist Episcopal Church. “We can’t forget the church bombing and the deaths of four little girls in this town just because they were different. . . . The only way you can drive out hatred is with love.”

Gench, at New York Avenue Presbyterian, said Sunday’s sermon was not the first or the last moment his congregation will focus on openness toward immigrants and refugees.

Members signed a letter after the service addressed to officials who identify themselves as Presbyterian — that includes Trump plus eight Democrats and 27 Republicans in Congress, according to the Pew Research Center’s tally.

For Gench, it all comes back to Scripture, which tells the stories of people driven from their homes again and again, from Abraham to Moses to Jesus. That’s why he’s not surprised that the message of welcome for all refugees came from pulpits of all political and theological persuasions on Sunday morning.

“The biblical heritage is really strong on this issue, probably as strong as almost any issue could be,” he said. “Anybody who reads the Bible knows that this is a huge issue.”

Hamil Harris, Colby Itkowitz, Michael Schulson, Kate Shellnutt,Scott Clement and Bobby Ross Jr. contributed to this report.