The wheel is turning full circle. Last week the Israeli parliament updated a 59-year-old law originally intended to prevent hundreds of thousands of Palestinian refugees from returning to the homes and lands from which they had been expelled as Israel was established.
The purpose of the draconian 1954 Prevention of Infiltration Law was to lock up any Palestinian who managed to slip past the snipers guarding the new state's borders. Israel believed only savage punishment and deterrence could ensure it maintained the overwhelming Jewish majority it had recently created through a campaign of ethnic cleansing.
Fast-forward six decades and Israel is relying on the infiltration law again, this time to prevent a supposedly new threat to its existence: the arrival each year of several thousand desperate African asylum seekers.
As it did with the Palestinians many years ago, Israel has criminalised these new refugees – in their case, for fleeing persecution, war or economic collapse. Whole families can now be locked up, without a trial, for three years while a deportation order is sought and enforced, and Israelis who offer them assistance risk jail sentences of up to 15 years.
Israel's intention is apparently to put as many of these refugees behind bars as possible, and dissuade others from following in their footsteps.
To cope, officials have approved the building of an enormous detention camp, operated by Israel's prison service, to contain 10,000 of these unwelcome arrivals. That will make it the largest holding facility of its kind in the world – according to Amnesty International, it will be three times bigger than the next largest, in the much more populous, and divine retribution-loving, US state of Texas.
Israeli critics of the law fear their country is failing in its moral duty to help those fleeing persecution, thereby betraying the Jewish people's own experiences of suffering and oppression. But the Israeli government and the large majority of legislators who backed the law – like their predecessors in the 1950s – have drawn a very different conclusion from history.
The new infiltration law is the latest in a set of policies fortifying Israel's status as the world's first "bunker state"- and one designed to be as ethnically pure as possible. The concept was expressed most famously by an earlier prime minister, Ehud Barak, now the defence minister, who called Israel "a villa in the jungle", relegating the country's neighbours to the status of wild animals.
Barak and his successors have been turning this metaphor into a physical reality, slowly sealing off their state from the rest of the region at astronomical cost, much of it subsidised by US taxpayers. Their ultimate goal is to make Israel so impervious to outside influence that no concessions for peace, such as agreeing to a Palestinian state, need ever be made with the "beasts" around them.
The most tangible expression of this mentality has been a frenzy of wall-building. The best-known are those erected around the Palestinian territories: first Gaza, then the areas of the West Bank Israel is not intending to annex – or, at least, not yet.
The northern border is already one of the most heavily militarised in the world – as Lebanese and Syrian protesters found to great cost last summer when dozens were shot dead and wounded as they approached or stormed the fences there. And Israel has a proposal in the drawer for another wall along the border with Jordan, much of which is already mined.
The only remaining border, the 260km one with Egypt, is currently being closed with another gargantuan wall. The plans were agreed before last year's Arab revolutions but have gained fresh impetus with the overthrow of Egyptian dictator Hosni Mubarak.
Israel is not only well advanced on the walls of the bunker; it is also working round the clock on the roof. It has three missile-defence systems in various stages of development, including the revealingly named "Iron Dome", as well as US Patriot batteries stationed on its soil. The interception systems are supposed to neutralise any combination of short and long-range missile attacks Israel's neighbours might launch.
But there is a flaw in the design of this shelter, one that is apparent even to its architects. Israel is sealing itself in with some of the very "animals" the villa is supposed to exclude: not only the African refugees, but also 1.5 million "Israeli Arabs", descendants of the small number of Palestinians who avoided expulsion in 1948.
This has been the chief motive for the steady stream of anti-democratic measures by the government and parliament that is rapidly turning into a torrent. It is also the reason for the Israeli leadership's new-found demand that the Palestinians recognise Israel's Jewishness; its obsessions with loyalty; and the growing appeal of population exchange schemes.
In the face of the legislative assault, Israel's Supreme Court has grown ever more complicit. Last week, it sullied its reputation by upholding a law that tears apart families by denying tens of thousands of Palestinians with Israeli citizenship the right to live with their Palestinian spouse in Israel – "ethnic cleansing" by other means, as leading Israeli commentator Gideon Levy noted.
Back in the early 1950s, the Israeli army shot dead thousands of unarmed Palestinians as they tried to reclaim property that had been stolen from them. These many years later, Israel appears no less determined to keep non-Jews out of its precious villa.
The bunker state is almost finished, and with it the dream of Israel's founders is about to be realised.
Jonathan Cook won the 2011 Martha Gellhorn Special Prize for Journalism. His latest books are “Israel and the Clash of Civilisations: Iraq, Iran and the Plan to Remake the Middle East” (Pluto Press) and “Disappearing Palestine: Israel’s Experiments in Human Despair” (Zed Books). His website is www.jkcook.net.
A version of this article first appeared in The National (Abu Dhabi)