After months of debate, the White House has approved plans to expand the military's authority to conduct airstrikes against the Taliban when necessary, as the violence in Afghanistan escalates, senior U.S. and defense officials said Thursday.

Several officials said the decision was made in recent days to expand the authority of U.S. commanders to strike the Taliban and better support and assist the Afghan forces when needed in critical operations, using the U.S. troops already in the country. There is a broad desire across the Obama administration to give the military greater ability to help the Afghans fight and win the war.

The 9,800 U.S. troops still in Afghanistan, however, would still not be involved in direct combat.

The officials were not authorized to talk publicly about the discussions so spoke on condition of anonymity.

The decision comes as the Afghans struggle with a resurgent Taliban, particularly in the south. But it is fraught with political sensitivities because President Barack Obama had made clear his commitment to get U.S. forces out of Afghanistan. That effort, however, has been stalled by the slow pace of the development of the Afghan military and the resilience of the Taliban.

The decision will give U.S. forces greater flexibility in how they partner with Afghan forces, but the new authorities must be used in selective operations that are deemed to have a strategic and important effect on the fight.

The Taliban are refocusing their attention mostly on the southern provinces of Helmand, Kandahar and Uruzgan, according to U.S. and Afghan military officials, although the insurgents also have struck elsewhere, such as in Kunduz province in the north, where they overran and held the provincial capital for a few days last fall.

The results have been daunting: The U.N. says 3,545 Afghan civilians were killed and 7,457 wounded in 2015, most of them by the Taliban.

The U.S. has continued to conduct counterterrorism strikes against al-Qaida and Islamic State militants in Afghanistan. But strikes against the Taliban were largely halted at the end of 2014, when the U.S.-led coalition's combat role ended. Limited strikes have been allowed in cases of self-defense or when Afghan forces were in danger of being overrun.

Gen. John Nicholson, the top U.S. commander in Afghanistan, has discussed with Defense Secretary Ash Carter his recommendations for moves the U.S. can make to further assist the Afghans. And there have been repeated conversations with the White House in recent weeks.

Pentagon press secretary Peter Cook, asked Thursday whether the administration was looking at expanding the U.S. military's authorities to strike the Taliban more broadly, said: "In every step of our review of Afghanistan, the question of what's the best way to use our forces is something we're constantly looking at. It's also in the same sense that we're looking at the number of troops. We are always looking at the authorities question and the best use of our troops."

Nicholson's predecessor, Gen. John Campbell, made it known before he left Kabul in March that he believed Carter should consider expanding U.S. military authorities to take on the Taliban.

As an example, U.S. troops are able to partner with Afghan special operations forces, but this new decision would allow commanders to have U.S. troops work more closely with conventional Afghan units in critical battles, including providing close air support or helping to call in strikes. Officials stressed that this will not allow routine U.S. airstrikes against the Taliban, just provide authority to take those actions when commanders believe they are vital to the fight.

Also under discussion is whether the U.S. should reduce the number of American troops in Afghanistan to 5,500 as planned by the end of this year, or if a higher number is needed. Campbell favored keeping the troop level at the current total of 9,800 into next year.

U.S. officials have insisted they are encouraged by the Afghan forces' resilience, despite their high rate of battlefield casualties. And they point to the Taliban's loss of its leader, Mullah Mohammed Akhtar Mansour, who was killed by a U.S. drone strike in late May in Pakistan.

The U.S. and NATO formally ended their combat mission in Afghanistan at the end of 2014, but have continued to provide support and assistance as the Afghan forces struggle to grow and gain greater capabilities, including in their air operations.

Brig. Gen. Charles Cleveland said last week that Nicholson was sending his assessment of the ongoing security threat there and the needs of the Afghan military to U.S. Central Command and to the Pentagon, and was expected to brief senior military leaders soon afterward.