JERUSALEM — Israeli lawmakers grappled on Tuesday with new questions of how to deal with the tens of thousands of migrants from Africa who have entered the country illegally, now that Israel’s Supreme Court has overturned a law allowing the government to detain migrants and asylum seekers for up to three years without trial.

A panel of nine justices ruled on Monday that the law, which came into effect in June 2012, violated Israel’s Basic Laws on human dignity and freedom. The court ordered the government to examine every detainee’s case within 90 days and to release any who are not the subject of deportation proceedings.

About 60,000 Africans have entered Israel since 2005, a vast majority of them from Sudan or Eritrea. The government said more than a year ago that it would step up efforts to deter, detain and deport the migrants, as residents mounted protests in areas where the new arrivals were concentrated, like south Tel Aviv.

About 2,000 African men, women and children are in detention facilities in the desert near the Egyptian border.