By Phil Stewart and Robin Emmott

BRUSSELS (Reuters) - The NATO alliance agreed on Wednesday to hold onto its broad geographic layout of bases in Afghanistan, a move that could make it easier for the United States to keep more troops there as Kabul struggles with a resurgent Taliban threat.

President Barack Obama has planned to slash the number of U.S. forces in Afghanistan from about 9,800 to 5,500 before he leaves office in 2017, despite calls from former commanders and envoys to halt the drawdown.

NATO defense ministers gathered in Brussels signaled a willingness to stay, with Britain's Michael Fallon saying flatly at a news conference: "This is the wrong time to walk away from Afghanistan."

He warned that any collapse of the country would send thousands more migrants heading to Europe at a time when the continent already faces uncontrolled migration flows.

Fallon said U.S. Defense Secretary Ash Carter told the ministers during closed-door talks that U.S. troop levels were again being reviewed.

Carter declined to confirm that at a news conference, saying it was "not a topic of discussion." He said Obama would be willing to consider security conditions in Afghanistan and their impact on force levels later in the year.

"I expect he will do that again as the year goes on," Carter said.

A U.S. official, speaking on condition of anonymity, said Carter did not tell NATO allies during the closed-door discussions that troop levels were being reexamined.

Obama has shown a willingness in the past to alter his plans in Afghanistan and last week approved giving the U.S. military greater ability to accompany and enable Afghan forces in offensive operations, including carrying out air strikes.

NATO Secretary-General Jens Stoltenberg said several nations on Wednesday committed to a troop presence next year in Afghanistan, underscoring a theme likely to figure prominently at next month's NATO summit in Warsaw.

"With a regional presence, we will continue to advise, train and assist the Afghan national forces because we are very committed to continuing to support Afghans," Stoltenberg said.

The United States contributes 6,800 troops to NATO's training mission in Afghanistan, which will fall to 3,400 under the current plan, a senior NATO diplomat told a small group of reporters on condition of anonymity. Washington also carries out a unilateral counter-terrorism mission in Afghanistan.

NATO's so-called hub-and-spoke model for troops training and advising Afghan forces extends well beyond the capital Kabul to allow an international military presence at regional hubs. But NATO policymakers had been examining whether it was possible to keep those posts open, even as force levels fall.

"I believe we'll have sufficient resources, and our military commanders have told us we'll have sufficient resources, to stay in the basic posture," the NATO diplomat said.

The diplomat also said NATO leaders are expected to agree to some $5 billion in funding to sustain Afghan security forces at the current levels through 2020.

The current NATO commitment to fund the Afghan security forces extends through 2017.

The funding is based on maintaining a goal of 352,000 Afghan soldiers and police. The official roster includes about 320,000 members of the security forces, a U.S. military commander said earlier this week.

(Reporting by Phil Stewart and Robin Emmott; Editing by Andrew Roche and Richard Chang)