The mission in Afghanistan has entered one of its most crucial periods. Now is not the time to pull back. The United States and its allies must finish the job.

The U.S. has been involved in combat operations in Afghanistan for almost 16 years.

To put that in perspective, consider that an 18-year-old soldier serving in Afghanistan today was only 2 years old on 9/11.

Yes, we have been there a long time. And as the Trump administration considers the way forward, it’s important to remember the goal of our mission.

Unfortunately, too many political and military leaders over the years have wrongly defined success in Afghanistan, leading many Americans to question why we’re still there.

Lofty “nation-building” goals—ensuring every road is paved, every girl goes to school, and everyone gets the right to vote—while all good things to aspire to, are not the reasons why we went to Afghanistan.

And they are not the reasons why we should remain.

This is a deadly region.

Twenty of the 98 U.S.-designated terrorist organizations have bases in Afghanistan and Pakistan, making it the highest concentration of terrorist groups anywhere in the world.

The No. 1 priority of our leaders when it comes to defining our national security policies is to keep the U.S. and our allies safe.

Here’s the reality: The Afghan military is far from perfect, but perfection is not the goal. The goal in Afghanistan is to get their forces to a level where they can handle the insurgency themselves, without tens of thousands of Western troops on the ground.

That is why America’s mission in Afghanistan should be focused on training and funding the Afghan military so that it will eventually be able to stop interference from outside powers and it will be able to prevent the establishment of terror bases that were there before.

That should be our goal. Nothing more, nothing less.

Losing our focus and losing our resolve could mean disastrous consequences down the road.

We need look no further than what happened in Iraq when the Obama administration deemed the war over and prematurely pulled out our troops there.

Iraq is a case study in how to get it wrong. The abrupt U.S. troop withdrawal in 2011 deprived the Iraqi government of important counterterrorism, intelligence, and training capabilities that were needed to keep the pressure on al-Qaeda, which then morphed into ISIS. This allowed it to regain strength in a much more permissive environment.

As the rise of ISIS and Iran’s new-found meddling in the region have shown, a war isn’t over simply because we want it to be or because a U.S. president says so.

We should not make the same mistake in Afghanistan.

This is a generational fight that is going to require a generation of commitment.