More people are on the run than ever before in recorded history, the United Nations said in a report released Monday.

They include those fleeing marauders in South Sudan, drug gangs in Central America, and the Islamic State in the Iraqi cities of Mosul and Falluja. While most are displaced within their own countries, an unprecedented number are seeking political asylum in the world’s rich countries. Nearly 100,000 are children who have attempted the journey alone.

All told, the number of people displaced by conflict is estimated to exceed 65 million, more than the population of Britain.

The new figures, part of the United Nations refugee agency’s Global Trends Report, come as hostility is surging toward migrants and refugees in the Western countries where they are seeking sanctuary and relief.

The European Union has shown signs of fracturing over how to handle the influx of people crossing the Mediterranean Sea.

The United Nations high commissioner for refugees, Filippo Grandi, expressed alarm on Sunday about what he described as a “climate of xenophobia that is very worrying in today’s Europe.”

On Saturday, the United Nations secretary general, Ban Ki-moon, denounced what he called “border closures, barriers and bigotry” during a visit to Lesbos, the Greek island where thousands of asylum seekers have arrived, mainly from Syria, Iraq and Afghanistan. Mr. Ban implored European leaders to stop treating refugees as criminals.

“Detention is not the answer. It should end immediately,” he said. “Let us work together to resettle more people, provide legal pathways and better integrate refugees.”

The issue of how to handle the worldwide movement of people, whether they are fleeing war, persecution, poverty or environmental devastation, will be a major theme in September at the annual meeting of world leaders at the United Nations General Assembly.

In the United States, which historically has resettled more refugees than any other country, the Obama administration’s promise to absorb 10,000 Syrians by October is off to a slow start. The administration also is facing criticism from rights advocates over a new round of deportations of Central Americans, including women and children.

Several American states have tried to block the resettlement of Syrians. The latest effort, in Texas, was thrown out by a federal judge last week.

The annual report by the United Nations refugee agency found that in 2015, 65.3 million people remained forcibly displaced from their homes by war and persecution. Some had been displaced for decades because of protracted conflicts in countries like Afghanistan and Colombia.

Image

Migrants rested on Sunday outside the Moria detention center in Lesbos. Mr. Ban, on Saturday, denounced what he called “border closures, barriers and bigotry” and implored European leaders to stop treating migrants as criminals.CreditAngelos Tzortzinis/Agence France-Presse — Getty Images

The bulk of these people — nearly 41 million — were still living within their own countries. Never before had the United Nations documented so many “internally displaced persons,” as they are officially defined. The largest numbers were inside Syria and Iraq, but insurgencies in Nigeria and Somalia also scattered millions inside those countries.

Despite all the attention on Europe’s struggle to absorb refugees, the report found that 86 percent of them were living in low- and middle-income countries close to the countries in conflict, like Ethiopia, Jordan and Turkey.

Half of all refugee children are out of school, the report said, often because schools in their host countries are stretched beyond capacity.

In some ways the latest refugee numbers amount to a report card on the failure of the world’s most powerful leaders to end wars. From Syria to Afghanistan to the Democratic Republic of Congo, conflicts last longer, hospitals are bombed in brazen violation of humanitarian law, and aid workers complain bitterly that they are overwhelmed.

The report also highlighted the global dysfunction in accommodating refugees. Barely 200,000 people were able to go home last year or find a permanent home in a foreign country.

Jan Egeland, the head of the Norwegian Refugee Council who serves as the humanitarian adviser to the diplomatic effort to end the Syrian conflict, said the growing ranks of the displaced demonstrated the “renouncement of responsibility” by countries that have the power to end wars.

A version of this article appears in print on , on Page A3 of the New York edition with the headline: Record 65 Million People Displaced, U.N. Says. Order Reprints | Today’s Paper | Subscribe