Three American-made helicopters swooped over a religious gathering, taking aim at the field below. The Afghan pilots unleashed volleys of rockets and machine-gun fire, killing scores of people.

The April 2 airstrikes in Kunduz province’s Dasht-e Archi district targeted Taliban leaders, Afghan officials said. But the incident was messier than that. While some Taliban members were there, so were children, an investigation by the United Nations Assistance Mission in Afghanistan found in May. At least 36 people were killed and 71 were wounded, the investigators said. And at least 30 of the dead were children.

The incident is emblematic of a troubling issue as the U.S. military’s years-long effort to train the Afghan air force begins to make headway.

In the last three years, the force has expanded from barely flying to launching scores of strike missions most months, according to statistics released by the U.S.-led military coalition. However, as operations have increased, so have instances of civilian casualties documented by human rights groups.

The U.N. mission recorded 149 civilian deaths and 204 wounded as a result of air operations in Afghanistan in the first half of 2018, it said in a report released this month. The Afghans, despite carrying out fewer strikes than Western counterparts, were responsible for half of the deaths and injuries, U.N. analysts said. In 2017, the Afghan air force caused at least 99 civilian fatalities and 210 injuries, the United Nations found.

The trend has prompted human rights groups to call for the United States to press the air force to do more to prevent civilian casualties. Right now, it appears that its leaders define success as kills, regardless of civilian casualties, said Patricia Gossman, a researcher with the nonprofit Human Rights Watch. 

“If the Afghan government and U.S. trainers do not address this fundamental problem, they have lost the most important battle — that of convincing ordinary people the government cares about their losses, and that they can get justice,” she said.

Afghan President Ashraf Ghani has appointed a team to review the strike in Dasht-e Archi. U.S. advisers “constantly reiterate the importance of minimizing civilian casualties” and emphasize the importance of making sure all conditions are met before a weapon of any kind is used, said Army Lt. Col. Martin O’Donnell, a U.S. military spokesman. O’Donnell noted that the recent U.N. report showed that 67 percent of all Afghan civilian casualties this year have been caused by insurgents. The U.S.-led coalition assesses that number at 80 percent.

The concerns come as the Afghan air force makes gains in other areas. With the number of Afghan pilots and mechanics growing, it is on pace to set records on the number of flights it makes, according to the U.S.-led coalition.

The growth has come even though Afghans continue to run away after being sent to the United States to receive air force training. Air Force Brig. Gen. Phillip A. Stewart, who recently completed a one-year tour leading the advising mission, said that the “absconder” issue — which has prompted congressional outcry in the past — has not gone away, with a “couple dozen” Afghans disappearing each year. 

Hundreds of U.S. troops are devoted to advising the Afghan air force, primarily at a headquarters at Kabul International Airport and a training center in Kandahar Airfield. Stewart said that the air force is less prone to desertion than the Afghan army in part because of the skills its members learn, but he acknowledged that they face a significant perception problem.

“Every time there’s an explosion in Afghanistan it’s ‘The Afghan air force did it,’ ” he said. “And actually, very rarely is that the case.”

Stewart said that the U.S. military has sought to improve Afghan strikes in part by reviewing video recorded on their A-29 strike planes after a strike occurs.

A centerpiece of air force growth is Kandahar Airfield, an installation that was home to thousands of Americans during the Obama administration’s surge in U.S. troops to Afghanistan. The base is smaller now but is expected to grow again as it becomes a “center of excellence” for Afghan helicopter training, said Col. Christopher Goodyear, the senior Air Force officer there. 

About 350 U.S. troops are involved in the advisory mission on Kandahar Airfield. Their headquarters is called Camp Ransom — a reminder that even the adviser mission they’re doing away from the battlefield can be dangerous. It is named after Air Force Maj. Charles A. Ransom, who was among eight Americans killed by a gun-wielding Afghan pilot in 2011.

The advisers are teaching the Afghans how to fly Black Hawk helicopters, a longtime workhorse of the U.S. military, to replace their aging Russian-made Mi-17s. The decision is not without controversy. While the coalition has struggled to get parts for the old Russian aircraft, the Black Hawks are unable to lift as much as the Mi-17s and will require U.S. assistance for years, according to a May report by the Defense Department inspector general.

Among the skills that the Afghan air force has honed this year is basic sheet-metal work that enables it to repair battle damage to Mi-17 helicopters — something it has had to do at least six times this year, U.S. military advisers said.

The Afghan air force received its first Black Hawks last fall and agreed to set aside the first 10 for training with U.S. military advisers as a means of sustaining the mission, Goodyear said. The Afghan air force expects to have up to 36 Black Hawks in Afghanistan by the end of the year.

During a visit to Kandahar Airfield this spring, a Washington Post reporter accompanied a retired U.S. Army pilot and an Afghan pilot on a training flight. The American, who asked to be identified only by his first name, Travis, for his security, walked the Afghan through safety checks, and then guided him through a two-hour mission. They practiced dusty landings on a rocky plateau, and Travis offered encouragement that the Afghan would someday teach others. 

“People are going to make mistakes. People are going to do something crazy,” Travis told the pilot, Salim. “But you have to know when to stop it.”

An Afghan squadron commander, who asked to be identified only as Safi because of security concerns, said that he “doesn’t care” about the criticism of the Black Hawk, saying that it is more maneuverable than the Mi-17 and has better hydraulics. He is working to build a professional corps of pilots, he said.

“I don’t want the rules that were here in the past,” he said, alluding to how Russians trained Afghan pilots in the 1980s. “I’m looking to see pilots who are trained on the new system, who speak English and will fly to new standards.”