Saudi Arabia has been constructing a 600-mile East-West barrier on its Northern Border with Iraq since September.

The main function of the barrier will be keeping out ISIS militants, who have stated that among their goals is an eventual takeover of the Muslim holy cities of Mecca and Medina, both of which lie deep inside Saudi territory, according to United Press International.

This past week, a commander and two guards on the Saudi-Iraq border were killed during an attack by Islamic State militants, the first direct ground assault by the group on the border.

"It is the first attack by Islamic State itself against Saudi Arabia and is a clear message after Saudi Arabia entered the international coalition against it," Mustafa Alani, an Iraqi security analyst with close ties to Saudi Arabia's interior ministry, told Reuters.

The Saudi "Great Wall" as it's being dubbed by some media outlets, will be a fence and ditch barrier that features soft sand embankments that is designed to slow down infiltrators on foot and are too step to drive a tired-vehicle up, according to the Telegraph of London. It will have 40 watchtowers and seven command and control centers complete with radar that can detect aircraft and vehicles as far away as 22 miles as well as day and night camera installations.

The barrier system will have five layers of fencing, complete with razor wire and underground motion sensors that trigger a silent alarm. The 600-mile structure will be patrolled by border guards and 240 rapid response vehicles. The Saudis sent 30,000 soldiers to patrol the border in July 2014 after ISIS forces swept into western Iraq and Iraqi guards on the Saudi border fled.

The Saudi Wall was first proposed during the Iraq civil war in 2006, but the rise of the Islamic State, which now controls large sections of Iraqi territory, prompted the Saudi government to implement the plan.

But it's not the first Saudi border wall. Since 2003, in fits and starts due to Yemeni opposition, the Saudi government has been working on a less costly barrier along the 1,100 mile border with Yemen on the Kingdom's southern border.

And Saudi Arabia is not the only country that has turned to a physical barrier to keep its enemies or illegal immigrants out.

The Saudi's wall is designed to function as the modern equivalent of the Great Wall of China, which was completed in 206 B.C. The Great Wall was intended to force attacking armies to have to circumnavigate the 5,500-mile structure.

In the modern history of wall building, the Soviets militarized the border with Western Europe and separated East and West Berlin with the 87-mile Berlin Wall to stop would-be defectors from escaping to the West through the divided city that had an open border up until 1961.

The US government started constructing a 700-mile border-fence on the Mexican border in order to stem the flow of illegal immigrants back in 2006 that President Obama claimed in 2011 was, "now basically complete," according to Politifact.com. But critics say that statement is untrue.

Get the Monitor Stories you care about delivered to your inbox. By signing up, you agree to our Privacy Policy

Israel operates a 455-mile long "Separation Barrier" to the tune of a yearly average of $260 million in maintenance costs. It criss-crosses its way along the 199-mile Green Line that separates the West Bank from East Jerusalem, according to Al Jazeera. The Separation Barrier's loops and curves have surrounded some Palestinian communities on all sides and cut off some farmers from their agricultural land.

According to a June story from CBS News, ISIS wants to unite the entire Levant, which includes land in Israel, Jordan, Kuwait, Syria, and Iraq. Jordan has sent more tanks and rocket launchers to the border with Iraq and its forces remain on "high alert," as was reported in a June BBC story, and Kuwait's border with Iraq has been relatively quiet because Iraq's Shia population lives in the areas north of Kuwait, according to the same report.