ANALYSIS: After deadly ISIS attack, will Trump send more US troops to Afghanistan? There is growing concern the security situation in Afghanistan may be worsening.

 -- A key American ally in the fight against terrorism, Afghanistan, was rocked by another flagrant deadly attack Wednesday, but this time with ISIS claiming responsibility. Gunmen dressed as doctors infiltrated and attacked a military hospital in the country’s capital, killing at least 49 people and wounding dozens more.

If ISIS is responsible, it would be one of the group’s most brazen and deadliest attacks in this country. It would also mark a setback for the U.S., which has been training Afghan security forces for years as it has drawn down its own troops.

The U.S. withdrawal was halted last year, but after 15½ years of war, with 2,377 American troops killed and hundreds of billions of dollars spent, there are increasing concerns that the security situation in Afghanistan may be worsening and growing questions about what President Donald Trump’s administration plans to do about it.

The White House announced Thursday that it is reviewing U.S. policy. But what are the administration's options, and will it mean more Americans troops heading to the battlefield?

WHAT’S HAPPENING ON THE GROUND?

Right now the U.S. has 8,450 troops on the ground who are focused on training Afghan security forces to take on the Taliban. About 2,000 of them belong to a counterterrorism mission targeting al Qaeda and ISIS fighters. Battling multiple enemies has stretched Afghan troops who have endured heavy casualties as they take the lead in the fights.

Last summer, President Obama approved broader authority for American forces that permits them to support offensive operations by the Afghans, including by accompanying Afghan troops on missions and by conducting airstrikes.

Those efforts focus on the Taliban, which remains the greatest threat to the country's security. The U.S. Special Inspector General for Afghanistan Reconstruction reported in January that the Taliban or insurgent groups like it either control or are contesting control in districts where 36.5 percent of Afghans live. That is up 15 percent since November 2015.

“We’re in a stalemate,” Gen. John Nicholson, the top U.S. commander in Afghanistan, told Congress last month. He asked for “a few thousand” more troops to train and assist Afghan forces.

The Taliban threatens Americans directly, too, such as when last November two U.S. service members and two contractors were killed in a bomb blast at the Bagram military base.

But even before Wednesday’s deadly attack, Afghan officials have been warning that ISIS Khorasan, the group’s affiliate in Afghanistan and Pakistan, is increasing its capacity to strike, reflecting the complexity of a terror threat in which militants often switch allegiances between groups.

“All insecurity worries us,” said the Afghan ambassador to the U.S., Dr. Hamdullah Mohib. “Any new group -- whether it’s an old group or they change the flag and start calling themselves a different name or a different allegiance -- what’s important to us is we want to end all terrorism in Afghanistan.”

American officials and experts share some of the concern, although they say progress has been made against this ISIS affiliate. Nicholson reported in December that nearly one-third of the affiliate's fighters had been killed, including its top 12 leaders.

“We’re concerned about anywhere that ISIS might look to establish a foothold,” said State Department acting spokesperson Mark Toner, emphasizing that this is “why it’s so important for us to continue our efforts to stabilize Afghanistan.”

“I don’t think we should view the threat as fundamentally different from where it has been,” said Michael O’Hanlon, a senior fellow at the Brookings Institution who has written extensively about Afghanistan. “But one of the reasons why we need to stay engaged is so that it doesn’t get worse.”

WHAT ARE TRUMP’S OPTIONS?

White House press secretary Sean Spicer announced Thursday that the administration is reviewing its Afghanistan policy, including whether to send more U.S. troops.

“We are in the middle of a comprehensive review on our policy in Afghanistan… working with our Afghan partners and the Department of Defense and our key military leaders to create an approach to address Afghanistan to defeat ISIS,” he said.

He deferred questions about a possible increase in troop levels to the Pentagon. But just hours prior, the commander of the U.S. Central Command suggested the military would recommend that.

“I do believe it will involve additional forces to ensure that we can make the advise-and-assist mission more effective,” said Gen. Joseph Votel.

Afghanistan’s ambassador to the U.S., Hamdullah Mohib, said his country would welcome additional troops. The Trump administration has not yet agreed to that but in the past, Trump has shown some deference to military leaders.

“I think the president will heed the advice of the generals and Secretary Mattis,” Spicer said on Feb. 9 about possible new deployments to Afghanistan.

An increase in troops in Afghanistan and greater military spending there could come at the expense of other federal agencies, in particular the State Department and the U.S. Agency for International Development which are said to face possible deep budget cuts. That raises separate concerns of a possible diminishing of U.S. aid toward strengthening Afghanistan's government institutions and civil society.

The State Department wouldn’t comment on any possible reductions.

“At the outset of a new administration, we’re looking at a broad review of current policies,” said Toner. “But let me just stress that our commitment to Afghanistan remains rock solid.”

WHAT HAS TRUMP SAID IN THE PAST?

Afghanistan has not been a major topic for Trump either as president or when he was a candidate. In neither his nomination-acceptance speech at the Republican National Convention nor his recent joint address to Congress did Trump mention America’s longest-running war.

As president, he has called Afghan President Ashraf Ghani once, afterward telling reporters, “I would say that that's a tough situation, but we'll do something about it … We'll be giving you some pretty good information soon.”

And what we have heard from administration officials this week stands in contrast to what Trump said before he ran for president.

“Let’s get out of Afghanistan. Our troops are being killed by the Afghanis we train and we waste billions there. Nonsense! Rebuild the USA,” Trump tweeted in 2013.

That notion became a familiar refrain of his during the campaign when Trump blasted the U.S. for wasting “trillions” of dollars in Iraq and Afghanistan.

“We’ve spent trillions of dollars in Afghanistan, in Iraq. We have nothing, we have nothing,” he said at a Columbus, Ohio, rally in November 2015.

“We’d go into Afghanistan, build a school; they blow it up. We’d build it again; they blow it up. We’d build it a third time; it’s still there barely,” he said at a campaign event in Virginia Beach in September 2016, adding, “What are we doing?”

Trump also said during the campaign that he would not fully withdraw the U.S. from involvement in Afghanistan.

“You have to stay in Afghanistan for a while because of the fact you're right next to Pakistan which has nuclear weapons, and we have to protect that. Nuclear weapons change the game,” he said last March.

The mixed messages leaves some experts uneasy.

“This administration has not articulated any specific policies vis-a-vis Afghanistan,” said Bharath Gopalaswamy, director of the South Asia Center at the Atlantic Council. “The bigger challenge that they would face here would be to make a convincing and coherent argument to reconcile U.S. engagement in Afghanistan with an America First doctrine.”

Now that Trump is in office, though, there is one person who seems to brush aside the president's rhetoric as a candidate: So far, Mohib, the Afghan ambassador to the U.S., said he has been encouraged by what his country has seen from the new administration.

“They’re not hesitant. There is no hesitancy that I noticed with the previous administration on the war on terrorism and their engagement in that aspect,” he said.

“We welcome that because what we need now more than anything is an attitude of winning, an attitude of ending this conflict once and for all,” he added. “And we have had a lot of positive hints from the administration in that regard.”

ABC News’s Luis Martinez and Elizabeth McLaughlin contributed to this report.