Israel allowed three Eritreans who had been stranded in no-man's land on the Egypt border to enter on Thursday, as part of a deal in which 18 other men from the group would head back toward Egypt.
The 21 Eritreans -- including two women and a 14-year-old boy -- had been stuck since August 30 between Israel's new and old border fences, in a zone technically within the sovereign borders of the Jewish state.
An Israeli NGO, We Are Refugees, filed a petition against Defence Minister Ehud Barak and Interior Minister Eli Yishai for refusing to allow them into the country, but at a Thursday session, the High Court did not reach a decision on the matter.
Later in the day an Israeli official told AFP that the agreement, under which the women and minor would enter Israel while the rest returned toward Egypt, was reached between military commanders from both sides, as well as the Eritreans.
"What was agreed upon there was of course authorised by the highest levels," the official said.
In a statement, Israeli Prime Minister Benjamin Netanyahu said "it's important that everyone understands that Israel is no longer a destination for infiltrators."
"We've built a fence to that end, and it has already reduced infiltrator numbers by 90 percent."
"We will increase measures against those who employ illegal infiltrators, and continue the effort to return infiltrators to the countries of their origin," said Netanyahu.
During Thursday's court hearing, the state had argued that Israel "could decide whom to let into its borders," and that asylum seekers who reach Israel via Egypt should apply for that status from Egypt.
Prior to the resolution of the affair, the United Nations High Commissioner for Refugees urged Israel to let the Eritreans in and apply for asylum.
"We very much urge the government to admit these persons without delay, and to review their asylum applications," William Tall, the UNHRC representative in Israel, told AFP.
"Israel has responsibility as a signatory to the refugee convention to allow asylum seekers access to their territory, and currently this is being denied, this is of great concern to us," he said.
Signup to our newsletter and follow us on Facebook and Twitter!
"Also of concern is the general humanitarian situation for these people there, in very difficult conditions without proper food, shelter and water, presumably," Tall said.
"It's altogether an unacceptable situation, and the whole purpose of this excercise is apparently to push them back to Egypt," he said, adding that smugglers in Egypt "are abusing and torturing" Eritrean asylum seekers.
Omer Shatz, an attorney for We Are Refugees called the solution "a way to shoot down the petition."
"Legally, it was obvious the state would have had to examine their asylum requests," he told AFP on Thursday evening.
Shatz said that not only the women and minor should have been allowed entry but the entire group.
"They reached this solution to prevent a legal precedent, which would have made the new and very expensive border fence totally redundant," he said.
The NGO insists that by refusing to take in the Eritreans, Israel is violating the 1951 UN Refugee Convention.
But Israel on Wednesday denied it had any legal obligation to let them in.
"The attorney general ruled today that there is no legal obligation to take in anyone located beyond the border," said the interior ministry.
"According to international practices and binding precedents, the fence is a de facto border, and therefore anyone who is beyond it is not located in Israeli territory and is therefore not eligible for automatic entry," a government spokesman said on condition of anonymity.
"There has been no determination by any international body according to which Sudanese or Eritrean citizens are persecuted in Egypt or that their lives are in danger.
"Therefore, there is no legal obligation to allow entry into Israel of those who are near the fence."
Israeli figures indicate there are already around 60,000 Africans living illegally in the country, most of them from Sudan and Eritrea.
Israel earlier this year launched a major campaign to round up and deport illegal African migrants, sparking an outcry from rights groups.