The Israeli parliament passed tough new legislation targeting illegal immigration early on Tuesday, giving authorities powers to detain migrants for up to three years without charge.
The legislation, an amendment to a 1954 law originally intended to deal with Arab militants trying to infiltrate the Jewish state, was passed by 37 votes to eight.
It also provides for prison terms of up to 15 years for anyone convicted of helping migrants involved in human trafficking, or smuggling weapons or drugs into Israel.
The legislation is part of the government's efforts to curb a huge influx of people sneaking across Israel's desert border with Egypt, the majority of them economic migrants from Africa.
Signup to our newsletter and follow us on Facebook and Twitter!
A posting on Prime Minister Benjamin Netanyahu's Facebook page boasted: "I too voted for the law."
Last month, the cabinet allocated 630 million shekels ($167 million, 124 million euros) for new measures to tackle illegal immigration, which Netanyahu has called "a national calamity."
The measures include tougher penalties for Israelis caught employing illegal migrants, a new detention facility for those caught and faster construction of a fence along the border with Egypt.
According to figures presented to the cabinet, there were 52,487 illegal immigrants in Israel at the end of last year.
Netanyahu has said he will travel to Africa in the coming months to discuss the issue, but has not specified which countries he will visit.