The Defense Ministry on Wednesday announced the completion of the main section of the 142-mile (230 km) Israel-Egypt border aimed at preventing the entry of migrants, terrorists, and smugglers.

The fence, comprising 45,000 tons of building material, took two and a half years to build at an estimated cost of NIS 1.4 billion ($377 million) and employed more than 100 contractors and 1,000 workers.

Reaching a height of 23 feet in certain areas, it includes a barbed wire fence, a dirt road, a patrol path, and communications infrastructure such as cameras and radar. It’s considered the most complex engineering project undertaken by the Defense Ministry due to the rough terrain.

Speaking during a visit to the Egyptian border, Prime Minister Benjamin Netanyahu lauded the government’s achievement in accelerating its construction.

“Mission accomplished,” said Netanyahu. “We restored our control of the border. It’s a huge accomplishment; we’ve achieved the impossible.”

The number of African migrants crossing the Egypt border into Israel plummeted in the last few months — from roughly 2,000 in May to zero in December.

The premier also said he is committed to repatriating tens of thousands of African migrants to their homes or to other foreign countries. “The same way we prevented the ‘infiltrators’ from entering Israel, so we will return those who are located in our cities,” he said.

“We will bring tens of thousands of migrants back to their countries of origin,” he said. When asked by journalists how Israel would return migrants to Sudan and Eritrea — the ministries of Justice and Foreign Affairs have expressed misgivings about such a move — Netanyahu answered that there was a way to accomplish such a goal, but that he didn’t want to get into particulars.

“There is a possibility to return them [the migrants],” he said. “The majority of those located here can be returned, according to the program. I would approximate that tens of thousands can be returned — but I’d rather not get into such details.”

Several hundred migrants from South Sudan were repatriated after that country announced its independence in July 2011.

According to international law, asylum-seekers cannot be forcibly repatriated to their war-torn counties of origin if the host country doesn’t have normal relations with the countries in question. Israel does not have diplomatic relations with Sudan and Eritrea.

Israel contends most of the migrants who are currently in Israel came seeking new economic opportunities, not because they were fleeing danger at home.

The final 7.5 mile (12 kilometer) portion of the fence, located near the Taba border crossing in the Eilat mountain region, is to be completed by May 2013.