ASSOCIATED PRESS Pastor Robert Jeffress of the First Baptist Church in Dallas introduces President Donald Trump during a rally in Washington on July 1, 2017.

An evangelical preacher is using the Bible to defend President Donald Trump’s dream of building a wall along the U.S.-Mexico border ― suggesting that even heaven will have a wall around it.

Robert Jeffress, pastor of First Baptist Dallas Church in Texas and a longtime Trump supporter, appeared on “Fox & Friends” Sunday to push back on the argument from House Speaker Nancy Pelosi (D-Calif.) and other Democrats that the wall is “immoral.”

“The Bible says even Heaven itself is gonna have a wall around it,” Jeffress said on the show. “Not everybody is going to be allowed in. So if walls are immoral, then God is immoral.”

In fact, American Christians are divided about the morality of Trump’s border wall. The Rev. John C. Dorhauer, general minister and president of the United Church of Christ, told HuffPost his denomination strongly rejects the idea that building a wall between nations is moral or biblical. He pointed to the Berlin Wall and walls used in Europe to divide Jewish people into ghettos as counterexamples.

“A wall indicates a failure to love our neighbor as ourself, the foundation of a law Jesus asked his disciples to embrace,” Dorhauer said.

But Jeffress, who often appears on “Fox & Friends” to defend the president’s policies, said he believes there’s nothing immoral about a border wall.

“The Bible teaches that the primary responsibility of government is to maintain order and keep its citizens safe, and there’s nothing wrong with using a wall to do that,” he said.

See Robert Jeffress’ interview on “Fox & Friends” below.

The pastor referred to two biblical passages to prove his point ― stories he’s referred to several times in the past to support Trump’s plans for a wall.

Jeffress claimed that God instructed Nehemiah, a 5th-century B.C. Jewish leader, to build a wall around Jerusalem to keep its citizens safe. Jeffress also claimed that heaven itself will be surrounded by a wall ― an apparent reference to a passage from Revelation, a book in the New Testament filled with apocalyptic visions. Revelation 21 claims there will be a “great and high wall” surrounding a “New Jerusalem” at the end of the world.

Trump addressed the morality of his border wall during his televised Oval Office address on Tuesday, arguing that politicians don’t build walls around their homes because they hate the people on the outside, “but because they love the people on the inside.”

After the address, Jeffress tweeted out his approval of what he called a “powerful speech.”

Powerful speech by President @realDonaldTrump! Americans should thank God every day that we have a president like Donald Trump who takes his oath of office seriously and is willing to do whatever is necessary to protect this country. — Dr. Robert Jeffress (@robertjeffress) January 9, 2019

Research indicates that American Christians have mixed feelings about the border wall. According to statistics from the Public Religion Research Institute, white Christians tend to support building a wall along the U.S.-Mexico border, including 67 percent of white evangelicals, 52 percent of white mainline Protestants and 56 percent of Catholics. But Christians of color tend to have a different opinion ― 73 percent of Hispanic Catholics, 66 percent of Hispanic Protestants and 70 percent of black Protestants oppose the border wall.

Pool via Getty Images President Donald Trump is greeted by Pastor Robert Jeffress during a rally on July 1, 2017, in Washington, D.C.

In addition, biblical exegesis on the morality of the border wall is complicated. For example, along with stories about Nehemiah building a wall, the Bible also contains stories about Joshua, a Jewish leader who tore down walls.

Matthew Soerens, U.S. director of church mobilization for the evangelical humanitarian organization World Relief, said he doesn’t think either of these stories should necessarily be used to prove the Bible is for or against governments building walls. What is clear to Soerens, however, is that the scriptures that guided Nehemiah also instructed Israelites to provide a hospitable welcome to people fleeing persecution.

“I believe in our time, as in Nehemiah’s, it would be immoral for our nation to refuse to help someone fleeing persecution to find safety when it is in our power to do so,” Soerens wrote in an email.

“We can and, at World Relief, believe we should advocate for changes to public policies that both ensure secure borders and provide welcome and mercy to vulnerable immigrants,” he added.

The notion that heaven will be surrounded by a wall is also a matter of debate among Christians. Some believe Revelation is a literal description of the End Times. Others see it more as apocalyptic literature that serves as a metaphor for God’s final redemption of the world.

DEA / BIBLIOTECA AMBROSIANA via Getty Images John's revelation of the New Jerusalem is imagined in this 19th-century engraving by the French artist Gustave Doré.

Zack Hunt, a progressive Christian blogger and minister from Tennessee, claims Jeffress is plucking verses from Revelation without taking the book’s literary genre and historical context into consideration.

Hunt, whose book about End Times theology will be published later this year, wrote in a Patheos blog that he believes Revelation is not meant to be taken literally. The book, written during a period when the Roman Empire was oppressing much of the ancient world, contains vivid imagery that was supposed to resonate with people of that time ― like city walls.

Ultimately, Hunt writes, although the “New Jerusalem” described in Revelation has a massive wall, the book also states that the gates of the city will never be shut.

“Yes, there is a metaphorical wall in the book of Revelation,” Hunt writes. “But it’s not there to sanctify Trump’s monument to racism, bigotry, and fear. It’s there as a subversive message of hope. A promise that one day the walls of exclusion and oppression and fear will be torn down. And the gates of heaven will be thrown open to welcome everyone regardless of race, language, or place of birth.”

Jason Miller, a leader with the Franciscan Action Network, a Catholic social justice group, told HuffPost it’s possible to “cherry-pick” any reference from the Bible to defend one’s point of view. But for Christians, the biblical command to love God and one’s neighbors should take precedence over all other teachings, he said.

“The United States has a right to secure our border, and we should and we have, but we also shouldn’t turn away those in need, especially those seeking asylum,” Miller told HuffPost. “Christians especially need to keep that last point in mind, especially those who believe that our nation was founded on Christian ideals.”