— The 18 Afghan soldiers were trapped in a mountainous outpost about 50 miles south of the capital, running out of ammunition. Taliban insurgents had surrounded them. There was only one way out: the Americans.

So the Afghans made the call, and soon Apache attack helicopters, F-16 fighter jets and Predator drones were in the sky overhead. Not a single weapon was fired by U.S. forces, but their presence was enough to send the militants running for cover. That allowed the Afghan military to send in reinforcements.

“The Americans saved the lives of my soldiers,” said their brigade commander in recounting the incident, which he said happened two weeks ago. He spoke on the condition of anonymity because he was not authorized to talk to the media. “They would have all died without the air support.”

The incident helps explains why Afghan military and police commanders in some of the most volatile areas of the country welcomed reports Saturday that the Obama administration plans to expand the U.S. military’s role here next year.

The decision permits American forces to carry out operations against the Taliban and other insurgents if they threaten U.S. troops. The American military would also continue to provide air support to Afghan security forces if they are attacked by the Taliban or other militant groups. The original plan was for the 9,800 remaining troops to only train and advise Afghan forces and conduct counterterrorism missions.

Afghan National army soldiers clean their weapons at their military camp in Kunduz, Afghanistan, 15 November 2014. (Jawed Ahmed/EPA)

Although many Afghan commanders have been eager to have U.S. military assistance, former president Hamid Karzai had limited American airstrikes and joint raids and had refused to sign a bilateral security agreement that would keep American troops past the end of the year. The new president, Ashraf Ghani, has forged a much closer relationship with Washington and swiftly signed the security pact after taking the oath of office.

“Our air force is not strong enough to support entire infantry units,” said Maj. Gen. Hamidullah, the top Afghan army commander for southern Afghanistan, based in Kandahar. Like many Afghans, he uses one name. “When we don’t have proper air support, the enemy targets our forces with heavy artillery from the mountains, destroying our positions.”

“No matter how strong we are, when we get the help of foreigners we get stronger, and we feel we can defeat the enemy,” he added.

The Taliban has stepped up its attacks in the capital and several provinces, particularly in the north, since Ghani’s inauguration nearly two months ago. The fighting this year has killed or wounded 7,000 to 9,000 Afghan soldiers, Gen. John F. Campbell, the top U.S. commander in Afghanistan, told reporters last month.

Ghani and his national security adviser agreed to the expanded U.S. military role in part because of their concerns about the rising number of casualties, said a senior Afghan official close to the president. The official added that the Obama administration and the Pentagon were also worried that Afghanistan could follow the path of Iraq, whose military was in such turmoil three years after the U.S. withdrawal that it lost big chunks of the country to Islamic State forces this year.

“They [Americans] have supported the government here for 13 years, and if you leave an army and police without proper support, this will reflect badly on them,” said the Afghan official, who spoke on the condition of anonymity to freely discuss the government’s point of view. “We are leading all the military operations, but [without] enough air support and equipment, which is why we’re facing heavy casualties.”

Another reason for the shift, said the official, was concern in Washington and Kabul that militants in the region belonging to the Taliban, al-Qaeda or other groups could “easily morph” into allies of the Islamic State.

Map/graphic: Afghan forces are expected to take the lead or have full responsibility for security across their country by the end of 2014.

“You can’t just leave a country like Afghanistan,” the official said. “If you don’t leave proper support behind, it can lead back to the bad old days.”

While Afghan military commanders were openly enthusiastic about the expanded U.S. role, the Ghani government is seeking to publicly play down the change. Officials are concerned that they could be perceived by Afghans as lackeys of the United States, an image the Taliban will almost certainly use in their propaganda.

On Saturday, the government’s spokesman emphasized that the Afghans are in charge of the fight against Taliban.

“Afghan forces are responsible for the security and defense of the Afghan people,” said Nazifullah Salarzai, the presidential spokesman, in an e-mail. “In the fight against international terrorism and training of our national security forces, we count on the support and assistance of our international partners.”

The government, the senior Afghan government official said, also wants clear parameters for U.S. combat operations in 2015. The Afghan government wants close coordination on approving airstrikes or joint nighttime raids on villages. In some cases in the past, such operations have led to civilian casualties and a severe backlash from the population.

Afghan military commanders said they hoped that the American assistance will make them better prepared for the spring, when the fighting usually intensifies.

“We hope it will lessen our casualties next year,” the brigade commander said. Before his 18 men were saved, he had lost more than 50 men in combat, he said.

Mohammad Sharif contributed to this report.