President Trump issued a new vision for America’s military during a speech to the nation on Monday night, declaring the era of nation building to be over while vowing to crush the opposition in Afghanistan.

Trump spoke of “principled realism” in asking US allies to contribute more to the battles against enemies overseas while pressuring other countries to help combat terrorism before it reaches our shores.

“Our nation must seek an honorable and enduring outcome worthy of the tremendous sacrifices that have been made,” the president said in a prime-time address to the nation from the Army’s Joint Base Myer-Henderson Hall in Arlington, Va.

“The men and women who serve our nation in combat deserve a plan for victory. They deserve the tools they need, and the trust they have earned to fight and to win.”

The president said his instincts had initially told him to simply pull out of Afghanistan after 16 years of war, as he had promised on the campaign trail.

But Trump said he recalled what happened when the US withdrew from Iraq in 2011.

“As a result, our hard-won gains slipped back into the hands of terrorist enemies,” he said.

Trump pledged to fight the war on terrorists in a new and relentless fashion.

“We will fight to win,” he said. “From now on, victory will have a clear definition: Attacking our enemies, obliterating ISIS, crushing al Qaeda, preventing the Taliban from taking over Afghanistan, and stopping mass terror attacks against America before they emerge.”

He also talked tough on terrorists, denouncing the bloodthirsty savages as “losers.”

“Terrorists who slaughter innocent people will find no glory in this life or the next. They are nothing but thugs and criminals and predators, and, that’s right, losers,” he said.

“Working alongside our allies, we will break their will, dry up their recruitment, keep them from crossing our borders, and yes, we will defeat them, and we will defeat them handily.”

Highlights of the speech included:

He pressured Pakistan to do more to help the US fight terror, and accused the Muslim nation of harboring Islamic radicals.

The president said he would not announce dates for accomplishing his military strategy so as not to tip off the enemy.

Trump said his approach would be based on “principled realism” — a phrase he has used before to describe his approach to dealing with repressive regimes like Saudi Arabia.

He said the US would fight to win, and that he had lifted restrictions for engagement imposed on the military by the Obama administration.

“We are not nation building again. We are killing terrorists,” Trump said. “We will no longer use American military might to construct democracies in faraway lands. Instead, we will work with allies and partners to protect our shared interests.”

Trump also demanded that NATO allies and India provide more help in the war on terror — and singled out Pakistan as an unreliable partner in that fight.

“Pakistan has much to gain from partnering with our effort in Afghanistan. It has much to lose by continuing to harbor criminals and terrorists,” he said.

Trump also lavished praise on the troops, and pointedly lauded the diversity of the military as its strength, a noted change from his remarks following the deadly protests in Charlottesville, Va.

“The men and women of our military operate as one team, with one shared mission, and one shared sense of purpose,” he said.

“They transcend every line of race, ethnicity, creed and color to serve together and sacrifice together in absolutely perfect cohesion.”

He did not specify the number of additional troops, as expected, although Fox News and other media outlets said the figure was roughly 4,000.

Currently, there are about 9,800 US troops and 25, 197 contractors on the ground in the war-ravaged country.

With Wire Services