Is building a wall on our border a morally good action? As a professor who has taught biblical ethics for 41 years, I think it is – in fact, the Bible itself repeatedly views protective walls with favor.

Walls gave peace and security. In the world of the Old Testament, people built walls around cities to protect themselves from thieves, murderers, and other criminals, and from foreign invaders who would seek to destroy the city. People could still enter the city, but they had to do so by the gate, so that city officials would have some control over who was coming in and going out. Today’s debate is about a larger area – a national border, not a city – but the principles are the same.

A strong wall gave peace and security to the city, and one prayer of blessing for a city was, “Peace be within your walls and security within your towers!” (Psalm 122:7). There was also a spiritual component, for the Lord himself strengthened the gates in the walls so they would protect the children and the peace and prosperity of a city:

Praise the LORD, O Jerusalem! Praise your God, O Zion! For he strengthens the bars of your gates; he blesses your children within you. He makes peace in your borders; he fills you with the finest of the wheat (Psalm 147:12-14).

After King David established his capital in Jerusalem, he prayed, “Do good to Zion in your good pleasure; build up the walls of Jerusalem” (Psalm 51:18) – God’s blessing would include strong walls! After David came King Solomon, who finished and strengthened the wall around Jerusalem (1 Kings 3:1).

But the people of Israel strayed from God, and he brought judgment in the form of Babylonian invaders who broke down and destroyed the city wall: “And they burned the house of God and broke down the wall of Jerusalem and burned all its palaces with fire and destroyed all its precious vessels” (2 Chronicles 36:19; cf. Jeremiah 52:14). God’s judgment removed the walls! As long as the wall around Jerusalem was broken down, it was a mark of shame and derision: “The remnant . . . who had survived the exile is in great trouble and shame. The wall of Jerusalem is broken down, and its gates are destroyed by fire" (Nehemiah 1:3).

The pathetic shame of a city without walls is also evident in this proverb: “A man without self-control is like a city broken into and left without walls” (Proverbs 25:28). The implication is that such a man and such a city are both headed for destruction.

After 70 years of exile in Babylon, the Jewish people were able to return and to rebuild Jerusalem’s wall. Nehemiah asked the Persian king Artaxerxes to give him the timber needed to build the wall and its gates: “And the king granted me what I asked, for the good hand of my God was upon me” (Nehemiah 2:8). In this case, God’s blessing was evident when the leader of the government authorized the allocation of materials to build the wall.

Then Nehemiah needed laborers for the massive task of rebuilding the wall. He challenged the people, “Come, let us build the wall of Jerusalem, that we may no longer suffer derision” (Nehemiah 2:17). Fortunately, “the people had a mind to work” (Nehemiah 4:6), and an entire chapter of Nehemiah is devoted to recording the names of people who rebuilt the wall, specifying the section that each person repaired (Nehemiah 3). Such a record – having their names forever in the pages of the Hebrew Bible – was a significant honor for those who repaired the wall. It was a morally commendable act.

There was a great celebration when the wall was completed: “And at the dedication of the wall of Jerusalem they sought the Levites . . . to celebrate the dedication with gladness, with thanksgivings and was singing, with cymbals, harps, and lyres . . . . Then I . . . appointed two great choirs that gave thanks” (Nehemiah 12:27, 31).

There is another wall in the Bible – at the very end of the New Testament. The apostle John has a vision of the New Jerusalem, a great city that comes down from heaven, and it includes a wall: “It had a great, high wall, with twelve gates, and at the gates twelve angels” (Revelation 21:12). Whether this is literal or simply part of a symbolic prophetic vision (I don’t know), it is clear that the wall protects the peace and security of those who are within.

My conclusion from this overview is that the Bible views border walls as a morally good thing, something for which to thank God. Walls on a border are a major deterrent to evil and they provide clear visible evidence that a city or nation has control over who enters it, something absolutely essential if a government is going to prevent a nation from devolving into more and more anarchy.

Objection: “We should be a nation that welcomes immigrants.” I agree wholeheartedly – if they come legally. But it is no kindness to them if the lack of a wall tempts them to risk death by walking across miles of parched desert, at the mercy of violent gangs, and then come into the US without legal documentation, only to live here as a permanent legal underclass, easily exploited, living in constant fear of discovery. In addition, it diminishes respect for the law and destabilizes the nation when millions of people exist in the shadows, living outside the legal recordkeeping functions of the nation.

And there has to be some limit on the number we admit each year. I would like the number to be higher than it is, but a complete “open borders” policy would overwhelm the country. The US population today is 328 million. The population of the world is 7.6 billion, or 23 times the US population. If we allowed in everyone who wanted to enter, as many as half the world’s population might want to come – giving us over 10 times our current population. Even if only 10% of the world (a very low estimate) came in through open borders, the US would suddenly confront the impossible task of trying to assimilate 760 million new immigrants into a nation of 328 million. “Open borders” is not a realistic solution or one that could ever get enough popular support to pass Congress and become law. Building a wall with well-regulated gates declares that while we welcome immigrants, we – not they – are going to decide which ones, and how many.

The US currently admits over 1,000,000 immigrants per year who come legally and stay permanently – far more than any other nation. If you think that number should be even higher (as I do), then suggest a higher number to your congressman and talk to your fellow citizens. Persuade people to agree with you, and work for a change in the law. But don’t oppose a border wall, for that is just promoting more lawlessness.

Objection: “The Bible tells us to care for the sojourner.” I agree – but we still must have some means of regulating how many “sojourners” we allow into the country and who can qualify to enter – and a wall is the most effective way to do this. When the Bible says, “Love the sojourner, therefore, for you were sojourners in the land of Egypt” (Deuteronomy 10:19), Old Testament professor James Hoffmeier has demonstrated that these “sojourners” (or “resident foreigners” in one translation; the Hebrew term is ger) were people who had entered another country legally, with the permission and knowledge of the country that admitted them. (The unmodified term “foreigner” in some translations is not specific enough to translate Hebrew ger.) A foreigner who had entered a country by stealth and did not have recognized standing as a resident alien was not considered a “sojourner” (Hebrew ger) but simply a “foreigner” (Hebrew nekar or zar).

Objection: “These are good people who are just seeking a better life.” Yes, many of them are, and we should welcome them – if they come legally. But we can’t ignore the fact that many others will not become “good neighbors” – some are drug runners, gang members, and even terrorists. A wall makes it possible to screen out the people who have previously been deported for felonies and others who are most likely to commit crimes or simply become a drain on the economy rather than getting a productive job.

An effective border wall would also be the best way to keep children together with their parents. Under the present system, families (1) enter the US illegally and (2) are caught, then (3) they plead for asylum, and (4) they are incarcerated until their asylum petition can be evaluated. But if we had a completed wall, such requests for asylum would be decided at the border, before they ever entered the US. We would never have to detain either parents or children on US soil in the first place.

Objection: “Walls don’t work.” That objection is not true. Sections of high, effective walls and fences have already transformed whole regions of San Diego and El Paso from high-crime zones into peaceful, much safer cities.

A high, double wall with modern electronic equipment to detect tunneling would stop perhaps 90-95 percent or even more of illegal border crossings. Once such a wall is complete, most Americans would feel that the border is finally under control, and the remaining questions about immigration could be resolved in an atmosphere of far less tension and animosity.

Walls that already work: In fact, we already have a highly effective system of “border walls” that nobody argues about – in our airports. Every time I return to the US from a foreign country, I have to go through customs at the airport, and so does everybody else. The room where people wait in line to see a customs officer has walls to make sure that all arriving passengers have to go through passport control. I’ve never seen anyone protesting the existence of walls in the customs area or demanding that a section of the wall be removed so that people who don’t want to go through passport control can simply walk into the country whenever they want. That would be an open invitation to terrorists and other criminals, and it would make it impossible for the US to place any limits at all on the number of people who came into the country and stayed without legal documentation.

Yet demanding “no passport controls at airports” is, it seems to me, exactly parallel to saying that we should not build a wall on our southern border. Why should airports be any different from other border entry points? Yes, we are a nation of immigrants, and we should eagerly welcome numerous immigrants into the US every year, but they must come in legally, through the gates in the wall, not illegally and dangerously across an open desert.