During his unannounced visit to Afghanistan earlier this month, Secretary of State Rex Tillerson offered misguided praise for the Afghan government as he reaffirmed the U.S. commitment there. He lauded the country for having “come quite a distance already in terms of creating … a much more vibrant government.” Unfortunately, the Afghan government is far from vibrant. More to the point, it is horribly corrupt, incompetent, and illiberal.

Instead of offering praise, Americans should be asking why their government continues to support such a dreadful regime. More importantly, why should Afghans support their own government? And without Afghans offering increasing support to their government, the “longest war” will likely only get longer.

Far from fair and judicious, the Afghan government enables its officials to get away with nearly anything. Transparency International’s Corruption Perceptions Index assesses the Afghan government as more corrupt than 96 percent of all governments in the international system. Understandably, Secretary Tillerson shared U.S. concerns about corruption during his recent meeting with the Afghan president, concerns that previous administrations frequently raised in the past and had ignored.

All of that corruption sounds a lot like what I saw when I served as the military commander of a provincial reconstruction team working with Afghan government officials in 2010.

The exemplar of corruption was an Afghan district chief in the remote southern province my team and I operated in. To supplement his income, the district chief would dispatch his bodyguard to establish illegal checkpoints. The bodyguard would shake down motorists, particularly those transiting goods to sell in nearby Pakistan.

Businessmen had caught on to the illegal checkpoints and devised their own workarounds. On one afternoon, a convoy of vehicles loaded with equipment destined for Pakistan came up to the illegal checkpoint. In this instance, the savvy businessman had unlawfully hired off-duty police to protect his goods. Naturally, neither side backed down, so a firefight erupted between the district chief’s bodyguard and cronies and the off-duty police, all of whom had already violated Afghan law well before they tried to kill each other.

In response, Kabul dispatched a special emissary. The emissary gave the provincial governor unique authority to fire the offending district chief. The provincial governor, himself exiled to the remote southern province as penance for corruption, promised to fire the district chief. In the end, though, he did no such thing. Instead, like the authorities in Kabul had previously done with him, the provincial governor simply moved the offending district chief to the same job but in a different location.

And regarding security, Afghan forces continue to fail. Despite boasting 365,000 members, they barely control or contest half of the country’s districts. Instead, the Taliban continue to make gains, now controlling larger swaths than at any point since their ouster. When previously in power, though, the Taliban managed to dominate more than 90 percent of the country, despite only having a security force of about 35,000.

How can today’s Afghan security forces, now 10 times larger, produce such inferior results? Moreover, for 16 years Afghan forces have had the world’s greatest military fighting alongside them. They have enjoyed billions of U.S. dollars, first-class training, and top of the line equipment, yet they continue to flounder against a much smaller enemy who has received substantially less training and inferior equipment.

Finally, Afghanistan’s government hasn’t made the country substantially freer than it was under the Taliban. Freedom House gives Afghanistan its lowest rating — not free; the same rating as when the Taliban controlled the country in 2001. Political rights and civil liberties’ scores indicate the Afghan government “may allow a few political rights” and they “strongly limit the rights of expression and association.”

Unfortunately, success hinges on the Afghan government, not U.S. efforts. U.S. military doctrine for counterinsurgency, developed in response to the wars in Afghanistan and Iraq, makes it clear: the goal of counterinsurgency is to “ensure that the host nation government meets the baseline expectations of the population to solidify its legitimacy.”

Sadly, Afghans continue to endure a government at or near the world’s worst, and a decade and a half of herculean efforts on the part of the U.S. and others have not moved the needle. Instead of offering praise, America’s leaders should stop spending America’s treasure, particularly the lives of its citizens, on such a misadventure.

Erik Goepner commanded military units in Afghanistan and Iraq. He is a visiting research fellow at the Cato Institute and doctoral candidate at George Mason University.