U.S. Defense Secretary Chuck Hagel speaks to American troops during a visit to Forward Operating Base Gamberi on Dec. 7, 2014. (Mark Wilson/Reuters)

Almost as soon as U.S. commanders begin a new support mission in Afghanistan on Jan. 1, anchored by four training hubs, they will start a year-long sprint to make the most of their time advising Afghan forces before the hubs are shuttered 12 months later.

The United States faces a tight timeline between the start of the U.S.-led NATO mission in 2015 and hitting the first milestone in President Obama’s plan for concluding the U.S. military effort in Afghanistan — closing the regional training sites, narrowing the effort to the capital, Kabul, and halving the number of U.S. troops on the ground — by Dec. 31, 2015.

By the time Obama leaves office in 2017, the U.S. military mission will end.

The race to take advantage of dwindling military resources reflects the high stakes of the administration’s plan to briskly shrink its presence in Afghanistan despite local troops’ deficiencies and the likelihood that the Taliban will seek to exploit the NATO pullout.

Gen. John F. Campbell, who commands international forces in Afghanistan, said he will evaluate the progress of Afghan forces under NATO tutelage over the course of 2015 and assess the strength of the insurgents as he determines the pace at which he will reduce the NATO force from 12,900 in January 2015 to about 8,000 by year’s end.

In line with a withdrawal plan announced by Obama in May, the number of U.S. troops will fall from 10,800 to 5,500 in that period.

“At 5,500 by the end of the year [2015], we’re going to go to Kabul-centric,” Campbell told reporters in the capital Saturday. “So what I have to work through is when do we make that decision to come back into Kabul.”

In 2015, NATO and U.S. trainers will be arrayed across Afghanistan, in part at four training commands. The United States will lead the eastern and southern hubs, while Italy and Germany will lead those in the west and the north.

At the same time, foreign troops will advise Afghan security ministries and train local special forces out of smaller bases in and around Kabul.

The regional commands are set to close by the end of 2015, leaving a training force based at fewer than 10 sites in the Kabul area and near Bagram air base.

One of the regional hubs is Forward Operating Base Gamberi, nestled amid the arid mountains in the east.

Defense Secretary Chuck Hagel, in a visit Sunday as part of his final tour of Afghanistan before leaving his Pentagon post, described the base as a model for the NATO training effort. At Gamberi, U.S. and other NATO forces have already been advising Afghan troops and police on a range of military activities, including budgeting, recruitment and use of intelligence.

Hagel spoke of the progress made since the war began in late 2001, when Afghanistan had no functioning defense ministry or military. Today, after a long international effort to build an Afghan force from scratch, local troops are able to plan operations and have kept the Taliban from maintaining control over key population centers.

“We don’t want to see that roll back downhill,” Hagel told troops at the base.

Campbell said that whether he decides to steadily reduce the number of U.S. troops over the course of 2015 or maintain a larger force until late in the year would depend partly on the scale of resources required to pull out troops and equipment en masse in late 2015.

Either way, the general will have to contend with enormous logistical challenges, such as either closing Kandahar Airfield, which has anchored military operations in southern Afghanistan, or transferring it to Afghan control.

But recent events suggest that Campbell may have flexibility in implementing the coming moves. Under Obama’s withdrawal plan, the number of U.S. troops was supposed to be 9,800 by the time the current NATO combat mission ends in about three weeks. But U.S. officials announced in recent days that they would keep up to 10,800 for part of 2015 to make up for a delay in troop contributions from NATO allies. The White House also recently granted U.S. forces expanded authorities to protect Afghan forces and respond to militant threats.

U.S. commanders may need every additional tool they can get as they attempt to ensure that Afghan forces, which especially require help with air power, intelligence, resupplying and special operations, are sufficiently capable by the time the United States ends its military presence two years from now.

The mission takes on new urgency after the collapse this summer of much of the Iraqi army in the face of an onslaught by Islamic State militants. Although Hagel and other military leaders reject the comparison with Afghanistan, the breakdown of a force the United States spent eight years training is a reminder of the risks in the current effort.

U.S. commanders say they have enough time and resources to achieve their goals despite the timeline for pulling out troops.

“The whole idea of train, advise and assist is to work yourself out of a job,” said Rear Adm. John Kirby, the Pentagon press secretary.