JERUSALEM — Israel's Supreme Court has ruled that five critically ill women from Gaza may enter Israel for urgent medical treatment despite a government decision preventing relatives of Hamas members from doing so.

The five women appealed to the court last month after their requests to enter Israel were rejected on the grounds of their relation to Hamas members.

The government decision denies entry for health care to relatives of Hamas members and is meant to exert pressure Gaza's rulers who currently hold the remains of two Israeli soldiers.

The court ruled late Sunday that the government decision was unreasonable and could not stand up to a legal test.

Four human rights groups representing the women said the government was using them and others seeking care unavailable in Gaza as "bargaining chips."