KABUL — Civilian casualties in Afghanistan have hit record highs as U.S. forces are withdrawing from the country, a U.N. mission reported Monday. The mission warned that the conflict is likely to become more deadly as fighting draws closer to urban areas.

Nearly 800 civilians were killed and more than 1,600 wounded in May and June, the U.N. Assistance Mission in Afghanistan said. The figures are the highest recorded during those two months since the mission began keeping track in 2009.

The war has entered a deadlier phase during the withdrawal of foreign forces that began in May. With less foreign support for Afghan government forces, the prolonged combat in rural areas and along urban peripheries is proving more dangerous for civilians.

The conflict is on a “grim and chilling trajectory,” said Deborah Lyons, the U.N. secretary general’s special representative for Afghanistan. If the war follows its current course, the mission reported, “the consequences for Afghan civilians could be catastrophic.”

The Taliban began a surge of attacks in May and now controls nearly half the country’s districts. In many cases, government forces collapsed ahead of Taliban advances and are now struggling to retake territory with less foreign support, particularly U.S. airstrikes.

Most civilians killed and wounded in May and June were struck by roadside bombs or trapped between Taliban and government forces during ground engagements, the mission reported.

The international community has repeatedly called for a cessation of the violence, but clashes appear to be escalating in many parts of the country.

The United States has accelerated its air campaign against the Taliban, the top commander of U.S. forces in Afghanistan said Sunday. Marine Gen. Kenneth “Frank” McKenzie said U.S. forces are prepared to keep up the pace.

The rise in civilian deaths has come as the Taliban has taken more territory. The militants’ push in northern Afghanistan that began this month is not included in the report released by the United Nations.

The U.N. mission counted 1,659 civilian deaths and 3,254 injuries during the first half of this year. The report details several grim milestones.

Roadside bombs killed and wounded more than three times as many civilians as in the same period last year. Women and children made up nearly half of civilian casualties. Afghan air force strikes killed and wounded more than twice as many civilians as in the first six months of 2020.

As U.S. air support has decreased, the Afghan air force has stepped up its operations. Afghan warplanes are carrying out more than three times the number of strikes as in the same period last year. The Afghan air force has a poor record of mitigating civilian casualties. With the dramatic increase in activity, the U.N. mission called on the force to review its targeting practices.

The Taliban remains responsible for the most civilian harm. The mission says the insurgents killed nearly 700 civilians during the first half of this year.

The past six months have witnessed two positive trends: Far fewer civilians were killed by suicide bombs or international airstrikes, and no civilian casualties were attributed to international military forces, the mission said.

“The conflict has taken on a distinctly Afghan fighting Afghan character,” it said.

The U.S. withdrawal is about 95 percent complete, the Pentagon said last week. About 650 U.S. service members will remain in the country to defend the U.S. Embassy and the international airport in Kabul.

President Biden has said the U.S. mission in Afghanistan will end on Aug. 31, when the withdrawal will be complete.

Alex Horton contributed to this report.