More than half of the estimated 180,000 people fleeing Libya in the past 10 days have sought refuge in Tunisia. Appealing for international help on Wednesday, the United Nations secretary general, Ban Ki-moon, said: “We need concrete action on the ground to provide humanitarian and medical assistance. Time is of the essence. Thousands of lives are at risk.”

Several aid groups were operating on the Tunisian and Egyptian borders, handing out food and supplies to the refugees and assessing the situation for providing more help.

But it was the Tunisian border that worried aid groups the most.

“There is an absolutely mammoth task that is absolutely imperative” to ease pressure on the border area, Sybella Wilkes, a spokeswoman for the United Nations refugee agency in Geneva, said Wednesday. “The capacity of the border area is bursting.”

Britain and France said Wednesday that they would send planes to airlift stranded Egyptians — a majority of the refugees, along with Bangladeshis, sub-Saharan Africans and others — from the Tunisian border. (Many Egyptians have headed to the Tunisian border because it is closer to Tripoli, Libya’s capital, where most had worked.)

Britain’s prime minister, David Cameron, told lawmakers in London, “I think it is vital to do this; these people shouldn’t be kept in transit camps if it is possible to take them back to their home, and I am glad that Britain can play such an important part in doing that.”

The French government said it would send several planes and a ship to take up to 5,000 Egyptians, and Italy said it would help set up a camp on the Tunisian border offering food and medical assistance.

Tunisian officials sought to maintain order on Wednesday, picking smaller groups to cross from among the crowds waiting at the crossing.

At one point, officials seemed to single out a small group of people from Guinea-Bissau, who held signs announcing their country of origin, and invited them to cross. The move appeared to upset a much larger group of migrant workers from Bangladesh, who surged around the main gate, forcing the authorities to escort the Guinea-Bissau group through a side door.

Once across, refugees board buses to a nearby airport — though many have limited means to buy tickets.
On Libya’s border with Egypt, the flow of new arrivals has decreased over the past several days. But there, too, thousands of migrants remain, sleeping on floors and outdoor pavement as they wait for their embassies to approve visas and arrange for flights.

In the Egyptian town of Salum, international assistance began trickling in, with medical supplies and assessment teams gathering at the border checkpoint.

Two Red Cross trucks filled with medical supplies idled on the Egyptian side of the border, and the authorities requested that the equipment be moved from an Egyptian truck to a Libyan one before it could cross, according to Samir Hadzimustafic, a Red Cross representative there.

A group of United Nations officials arriving at the crossing said they were headed to Benghazi, the emerging capital of rebel-controlled eastern Libya, partly to see if the port there could be turned into a full-fledged corridor for humanitarian relief.

The opposition’s control of eastern Libya creates complications for assistance organizations because they are not being invited in by the official government of Col. Muammar el-Qaddafi, said Abdul Haq Amiri, the head of the regional United Nations office for the coordination of humanitarian affairs.

“It is a first mission, intended to determine whether there is a need for help,” Mr. Amiri said.

With him were representatives of the World Food Program, Unicef, the World Health Organization and the United Nations refugee organization.

Other groups heading to the area include the International Medical Corps, Mercy Corps and the Organization of the Islamic Conference.

On Wednesday afternoon in Salum, a medical tent set up by the Egyptian Health Ministry was empty except for Nasr Abit Abdu el-Wadid, 32, an Egyptian laborer who had fled from Misurata, a city 130 miles from Tripoli that had seen heavy fighting. Soldiers, he said, had kicked him in the head, and doctors said his severely bloodshot eyes and swollen nose were evidence of head trauma.

He had fled with two friends from Surt, Colonel Qaddafi’s hometown. “The soldiers asked for my passport, and took my passport,” he said. “They took my mobile phone. They took all of our mobile phones. They took our money.”

Six professional basketball players from sub-Saharan Africa who were playing for teams in Benghazi arrived at the border on Wednesday, saying they feared being killed by Libyans who were assuming that any black Africans they encountered were mercenaries.

“All Africans are in trouble now, they will arrest you,” said Sunny Daykins, 19, a Liberian who played for a team called Al Hillal. “They don’t even give you time to speak.”

The United Nations said Wednesday that thousands of sub-Saharan Africans might cross into poverty-stricken Niger from Libya in the coming weeks because of those fears, Reuters reported.

In Salum, several women waited among the crowds of men. “There are more women inside Libya, but they are afraid to come out,” said Laura Seulu, 29, from Cameroon, who had been a maid for a family in Benghazi. Rebels, she said, had broken into her house, and she had left as soon as she felt there was a sufficient lull in the violence.