The law, which was championed by members of Prime Minister Benjamin Netanyahu's Likud party and his allies, passed with a 61-41 vote. But legal experts said that any attempt to implement it would likely lead to it being struck down by Israeli courts.
It would apply to Palestinian citizens of Israel and residents of annexed east Jerusalem who knew about their family members' attacks beforehand or who “express support or identification with the act of terrorism.”
They would be deported, either to Gaza or another location, for a period of seven to 20 years.
It was unclear if it would apply in the West Bank, where Israel already has a long-standing policy of demolishing the family homes of terrorists. Palestinians have carried out scores of stabbing, shooting and car-ramming attacks against Israelis in recent years.