President Obama is considering slowing the pace of the U.S. military exit from Afghanistan after more than 13 years of war “to ensure that hard-won progress lasts,” said new Defense Secretary Ash Carter.

Furthermore, Carter acknowledged that the president is reassessing the future of U.S. counterterrorism operations in Afghanistan.

Obama is expected to cut the current number of U.S. soldiers in Afghanistan, estimated at 10,000, in half by the end of this year and to a small U.S. embassy presence by the end of 2016.

Obama ended the U.S.-led combat mission in 2014, the deadliest year of the war for Afghan troops and civilians. U.S. troops are now conducting narrow counterterrorism operations.

Gen. John Campbell , the top commander of U.S.-led forces in Afghanistan, told a Senate panel earlier this month that he supports a slower withdrawal of troops from America’s longest war, which began on Oct. 7, 2001.

During a joint press conference with Afghan President Ashraf Ghani at the presidential palace in Kabul, Carter said Obama’s withdrawal plan could change as the U.S. reconsiders the strength of its Afghan counterterrorism mission in the future.

“Our priority now is to make sure…progress sticks,” said Carter during his first overseas trip as Pentagon chief and his 10th official visit to Afghanistan.

“That is why President Obama is considering a number of options to re-enforce our support for President Ghani’s security strategy, including possible changes to the timeline for our drawdown of U.S. troops,” he continued.

“That could mean taking another look at the timing and sequencing of base closures, to ensure we have the right array of coalition capabilities to support our Afghan partners, the right array to ensure that hard-won progress lasts, and of course the right force protection footprint for our remaining personnel,” explained Carter.

He did not explicitly say whether Obama was considering maintaining a U.S. military footprint in Afghanistan beyond 2016. Carter did say a slower withdrawal pace in 2015 and 2016 is “on the table.”

A reporter asked Carter whether the U.S. plans to maintain a “robust” counterterrorism mission beyond 2016.

“Counterterrorism of course will be a continuing preoccupation and commitment of ours here and everywhere where that needs to be done,” responded the Defense secretary. “And we are discussing and rethinking the details of the counterterrorism mission, and how the environment has changed here with respect to terrorism since we first laid out our plans.”

The presence of a small group of jihadists who pledged allegiance to the Islamic State (ISIS or ISIL) was confirmed in Afghanistan and neighboring Pakistan less than a month after President Obama ended the U.S.-led combat mission.

ISIS, which controls huge swaths of Iraq and Syria, claims that it has establish a presence in Afghanistan.

Nevertheless, the Pentagon has dismissed ISIS’ presence in Afghanistan as “nascent at best” and “aspirational.”

Republican critics of Obama’s Afghanistan strategy, such as Sen. John McCain (R-AZ), the chairman of the Senate Armed Services Committee, have warned against the premature withdrawal of U.S. troops from Afghanistan. It can result in a resurgence of violence similar to what happened in Iraq, they say.

“The lack of US and international presence… would only create a security vacuum in key parts of Afghanistan, and we have seen what fills similar kinds of vacuum in Syria and Iraq,” said Sen. McCain during a recent congressional hearing, referring to the rise of ISIS in Iraq and Syria.

Carter noted that U.S. troops are now focused on training, advising, and assisting the “350,000-strong” Afghan National Security Forces (ANSF), adding that American forces are also focused on a counterterrorism mission against “al-Qaeda and its remnants.”

The Pentagon has said that, after 2014, it will only target Taliban members who pose a direct threat to U.S. forces and their Afghan counterparts.

Afghan President Ghani said he will discuss the troop numbers with Obama “in the context of the larger partnership.”

Ghani said Afghanistan accepts “President Obama’s [troop withdrawal] framework, because he’s promised the American public a certain date, and that needs to be respected… What we need to do together is to understand the changed context, in what I call the ecology of terror.”

The White House recently acknowledged that Ghani had asked for “some flexibility in the troop drawdown timeline,” adding that the Obama administration was “actively considering” that.