A contingent of physicians from Doctors for Human Rights was prevented from reaching a group of Eritrean migrants camped out next to the Israel Egypt border on Thursday.

The doctors wanted to offer medical assistance to the asylum seekers, but were forbidden to approach them by the army. The group, which has been stuck between two fences at the border for a week, is made up of 21 people, among them a 14-year-old boy and a woman who suffered a miscarriage.

“There are people in trouble. It is inconceivable that we can’t offer them aid,” said Dr. Kobi Arad.

The High Court of Justice heard a petition Thursday to compel the defense and interior ministers to grant the migrants permission to enter the country.

The Israeli advocacy group “We Are Refugees” also asked the Court to order authorities to provide food, water and medical care to the individuals.

The petitioners claimed that the Eritrean migrants face imminent danger in their country of origin, and that the state cannot abandon them.

The State Attorney’s Office asked the court to reject the petition, claiming that the state had a right to determine who is allowed to enter its borders. The statement said that the army was instructed to give the migrants basic sustenance and, if necessary, also medical attention.

The state added that the migrants could appeal to Egyptian authorities for refugee status should they desire.

Supreme Court President Asher Grunis scheduled a second hearing for Sunday.

Interior Minister Eli Yishai said Wednesday that the group would not be allowed into Israel.

The group made it past the first of two security fences, but were stopped before crossing into Israel. Too scared to backtrack through Sinai, the Eritreans have been sitting in the sun without food or water save for a few beverages they have been given by Israeli soldiers.

Attorney General Yehuda Weinstein ruled Wednesday that Israel “has no legal obligation” to let the group of migrants enter beyond the fence, Prime Minister Benjamin Netanyahu’s office said in a statement. “According to international practice and precedence, the fence is the actual border, so whoever has not crossed it is not [located] in Israeli territory, and does not have an automatic right to enter.”

The statement further added that there is no international confirmation that the migrants are persecuted or facing grave danger in Egypt, and that Israel is therefore not obliged to let them through.

Human rights groups claimed Tuesday that the territory the migrants are in is technically Israel. The Association for Civil Rights in Israel stated: “Israel has every right to build a border fence, but this fence does not exempt it from its duties.”

The UN’s High Commissioner for Refugees’ representative in Israel, William Tall, expressed concern for the fate of the migrants, and urged Israel to allow them in.

Tall said that Israel’s commitment to international conventions on refugee rights obligates it to allow the migrants to enter the country and review their eligibility for refugee status.

“It is harder for me, more than anyone, to see these pictures, and send families back to their homelands,” Yishai said during an interview with Army Radio Wednesday morning. “But I am the one who has to make the difficult decision. If I have to choose between them and good of the state, its civilians, and its security, I choose that there be a fence, and that they [the migrants] don’t enter.”

Yishai said he hoped the group would return to Eritrea.

He touted the partially completed fence along Israel’s 240-kilometer (150-mile) border with Egypt as responsible for preventing a million refugees — he then corrected himself to say migrant workers — from entering Israel.

Meretz party leader Zahava Gal-On, on her Facebook page, criticized Yishai’s “brutal, xenophobic” decision not to allow the migrants into the country. She said the minister’s move was “not only immoral but also illegal under international law, which determines that refugees who are persecuted in their country, and who face danger if they return there, can be granted political asylum.”

Earlier Wednesday, Gal-On had called on Yishai to allow the group to enter Israel and to reassess their status.

Groups of activists traveled to the Israeli-Egyptian border Tuesday night and Wednesday morning to deliver food and water to the group. They claimed they were not allowed to deliver the goods to the Eritreans personally — but were promised by the IDF that soldiers would distribute the items.

“They [the IDF] were determined not to let us pass, and threatened to arrest us — and they meant it. In negotiations with the soldiers, the battalion commander proposed we leave the food behind, and that they would deliver it to the migrants,” one activist told Haaretz.

Media reports suggested that soldiers have complained of inadequate direction from their seniors on how to handle the situation.

Last month, in a similar incident, a group of African migrants was transferred to a detention facility for humanitarian reasons after being stuck between Israel and Egypt for four days.

Israel is believed to be considering a forced repatriation of Eritrean asylum-seekers back to their home country — a move that has been criticized by human rights groups but is nonetheless acceptable under international law because Israel and Eritrea have diplomatic ties.

On Monday the Interior Ministry announced that the border fence, along with other government policies, had aided in reducing the number of cross-border infiltrations by 90 percent, with August seeing only 200 migrants crossing the border compared to 2,000 in the same month last year.