While Donald Trump took a lot of heat for his recent “America First” speech, which foreign-policy experts rejected as “isolationist,” a scathing new Pentagon report on Afghan reconstruction backs his stance against nation-building.

In virtually every category — from infrastructure to education to security — our virtual adoption of that nation has been a costly fiasco.

In a report to Congress, the Defense Department reveals that Washington so far has spent an eye-popping $113.2 billion to rebuild Afghanistan — an amount that, adjusted for inflation, tops by $10 billion the total we committed to rebuilding post-WWII Europe under the Marshall Plan.

Yet in this case, taxpayers have almost nothing to show for it.

Much of the Afghan reconstruction funds have been lost to waste, fraud, abuse and rampant corruption. And unlike Western Europe, where we today enjoy profitable export markets, benighted Afghanistan (formally renamed the Islamic Republic of Afghanistan) offers virtually zero return on our massive investment.

After 15 years, “The reconstruction effort in Afghanistan is in a perilous state,” Special Inspector General for Afghanistan Reconstruction John Sopko concludes in his 236-page report.

The reconstruction mishaps in Iraq are legion and legendary. But less is known about the rebuilding of Afghanistan, where the screw-ups are just as bad, if not worse.

Take security projects and programs, which account for roughly 60% of the $113 billion in Afghan reconstruction funding.

Despite spending some $5 billion a year to stand up a national army and police force, “neither the United States nor its Afghan allies know how many Afghan soldiers and police actually exist,” the report says.

A large share are AWOL. In fact, Afghan military and police rolls contain potentially tens of thousands of “ghost” personnel, whose cost we still pay and whose absence distorts the security picture. Without US combat troops, the capital of Kabul is now relying almost exclusively on unreliable forces to defend itself from sacking.

A large chunk of the country remains unprotected and unstable. Almost a third of provincial districts are effectively under Taliban control, and the insurgency is intensifying.

In the space of just a few days in late March, for example, the Taliban assassinated an Afghan army general in Kandahar and a judge in Ghazni, while bombarding the new Afghan parliament building in Kabul with rockets.

The security situation is so bad that American personnel are generally confined to the US Embassy fortress, and have to take a helicopter to get to the airport because the roads are so unsafe. Bombings, raids, ambushes and hit-and-run assaults are common along major highways, even at police checkpoints.

American taxpayers are losing huge amounts of money thanks to corrupt and incompetent Afghan military contractors, who have misappropriated Pentagon funds. Here are just a few examples:

More than $200 million to buy fuel for army vehicles has gone missing.

Another half-billion dollars was wasted buying a fleet of second-hand Air Force cargo planes that were deemed too dangerous to fly.

More than $1 million was spent building and rebuilding army buildings that “melted” in the rain and crumbled because of substandard bricks and other materials.

About $32 million to install steel bars in culverts to prevent the Taliban from placing bombs under roads was also largely wasted.

Many of the bars were installed incorrectly or never installed at all, likely resulting in US troop deaths or injuries, according to the report.

Efforts at drug interdiction have also failed. Despite spending $8.4 billion on counter-narcotics programs, the poppy fields of Helmand province have largely been reclaimed by the Taliban, which sells opium to finance terrorism.

The opium trade, in fact, is flourishing. Here’s a stomach-turning stat: The 3,300 tons of opium the United Nations figured Afghanistan produced last year is the same number the UN calculated for the country’s opium production in 2000. So literally nothing has changed.

And despite spending $1 billion promoting Western-style democracy and human rights, harsh religious mandates still dominate Afghanistan, where Islamic law is still considered the supreme law. Girls are still forced into marriage with older men, women are still jailed for “moral crimes,” and both remain wrapped up in the oppressive burka.

Despite spending $760 million improving Afghan education, moreover, 3.5 million primary-school-age children — 75% of them girls — remain out of school. Recently, some 714 schools were closed.

“Nonexistent or ghost teachers have been a long-standing problem and, in most cases, attendance sheets are not filled out or are frequently forged,” the report said. The inspector general also found fully-staffed schools attended by only a handful of students.

Efforts to promote businesses have been a joke, despite nearly $800 million invested in that area. Taxpayers might be shocked to know, for example, that they invested $6.1 million in the development of a “Cashmere goat industry” that’s already flopped.

The inspector’s report concluded that economic-development programs have “done little to spur economic growth in Afghanistan.”

Washington nation-builders had projected they’d add $1.3 billion in growth to the Afghan economy in 2015. But no such boost has occurred. In fact, Afghan GDP actually fell to $19.7 billion in 2015 from $20.4 billion in 2014.

Nation-building in Afghanistan has been a boondoggle for US taxpayers. Yet in his fiscal year 2017 budget, President Obama calls for an additional $4.8 billion for major reconstruction funds there.

Why throw good money after bad? Trump’s right: let’s stop nation-building overseas and start rebuilding the US.

Paul Sperry is former Washington bureau chief of Investor’s Business Daily and author of “Infiltration” and “Muslim Mafia.”