Israel’s Supreme Court ordered the Israel Defense Forces on Sunday to admit five critically ill women who are close relatives of Hamas terrorists for urgent medical treatment, despite a government ban on providing health care to Hamas relatives.

The women appealed to the Supreme Court last month after Israel rejected their requests for entry.

Israel enacted a policy of denying entry for medical treatment to relatives of Hamas members in order to pressure the group to stop engaging in acts of terror and to release the bodies of two Israeli soldiers who were taken during the 2014 Gaza War, as well as two Israeli citizens who are being held captive.

The women were represented by Gisha (an organization that works for Palestinian freedom of movement), Adalah (a Palestinian legal-rights organization), El Mezan (a Gaza-based Palestinian-rights organization) and Physicians for Human Rights Israel (a medical-rights organization that asserts its rejection of the “ongoing occupation of the Palestinian Territory”).

Their petition of July 29 was accepted by Supreme Court Justices Uzi Fogelman, Isaac Amit and Ofer Grosskopf.

“Basing the decision on a relative’s prohibited activity, with no suggestion that the patient herself is involved in or even aware of the activity, is contrary to the basic principles to which we are committed,” said Justice Fogelman, the lead judge in the case.