Defense Secretary Jim Mattis said Thursday at the NATO defense ministerial meeting in Brussels the U.S. may have cut the number of troops in Afghanistan “too rapidly” amid a resurgent Taliban.

Mattis’ remarks came as NATO agreed to send more forces in response to commanders’ requests for as many as 3,000 troops to train and work alongside Afghan security forces. That number does not include an expected contribution of almost 4,000 American forces, divided between the NATO mission and America’s counterterrorism operations against Taliban, Al Qaeda and Islamic State militants in Afghanistan.

Mattis said at a news conference after the meeting that he was pleased by allies’ willingness to contribute more. The U.K. said it would pledge 100 more troops, though they will serve in a noncombat role.

“We still have a few gaps and nations are stepping up,” he said. “We’ve filled 70 percent of those gaps right now and I’m very, very optimistic that based on what I heard here we’ll be filling the rest.”

Mattis added that upon returning to Washington, he will consult with U.S. Gen. Joseph Dunford, chairman of the Joint Chiefs of Staff, and then will submit a recommended new Afghanistan strategy to President Donald Trump. “We will refine U.S. troop numbers at that time, within that framework,” he said.

Related stories…

He also appeared to place blame on the Obama administration for cutting the number of troops “too rapidly.”

“We may have pulled our troops out too rapidly, reduced the numbers a little too rapidly, but the difference today is that the Afghan army is actually able to carry the fight and they’ve been carrying the fight for some time now so there’s always new ideas you can come up with. There’s never a lack of those,” Mattis said. “There’s new opportunities and certainly the political will is there to carry this fight forward”

While justifying the need for more U.S. and NATO troops in Afghanistan, Mattis pointed to the results of “leaving ungoverned areas.”

“You see it coming out of Syria where ISIS has attacked this very town from Syria, it’s not like you can declare a war over or want it over or say I’m going to quit and you’re not going to pay a price for it,” he said.

NATO Secretary-General Jens Stoltenberg said the 29 NATO nations had pledged to spend 4.3 percent more in defense spending, or $12 billion more.  The announcement came following months of pressure from President Trump for each country in the alliance to spend more.

The expected deployment of more Americans is intended to bolster Afghan forces so they eventually can assume greater control of security.

Stoltenberg said the NATO increase does not mean the alliance will once again engage in combat operations against the Taliban and extremist groups.

There are now about 8,400 U.S. troops based in Afghanistan, with an additional 2,000 or so on temporary deployment. Some 6,600 troops from NATO and partner forces also are there.

Fox News’ Lucas Tomlinson and The Associated Press contributed to this report.