The new act determines that anyone entering Israel illegally can be held in Saharonim detention centre for up to three months, after which he or she will be moved to another detention facility called Holot for a period of up to 20 months. Both facilities are deep in southern Israel's Negev desert.
It also lays out stiffer penalties for those employing "infiltrators" -- a government term for illegal migrants, most of them Africans who slipped across the border from Egypt.
"With a great effort we managed to get the law enacted and prevent the closure of the Holot facility," Interior Minister Gilad Erdan said in a statement.
On September 22, the Israeli High Court struck down a law which allowed the government to detain illegal migrants for up to a year without trial.
Signup to our newsletter and follow us on Facebook and Twitter!
It also ordered the closure of Holot within 90 days. There are around 2,000 African detainees currently being held there out of an estimated 48,000 currently living in Israel.
Exactly a year earlier, the court blocked a similar law allowing migrants to be held for up to three years without trial.
Opposition MP Nitzan Horowitz, of the left-wing Meretz party, said that the latest incarnation would meet the same fate.
"This time too I tell you, clearly and unequivocally, this law too will be overturned by the High Court," he told the house.
"In a democratic state you cannot put people in prison without trial," he said.