The cartel killing of nine US citizens — three women and six children — in Mexico this month forced Americans to confront a discomfiting and undeniable fact: Our neighbor to the south increasingly resembles a failed state, where corruption and trafficking are a way of life — and the only law is the law of the cartel.

Now President Trump says he wants to take a significant step: designating the cartels as terrorist groups. Good.

The current Mexican government has proved to be deeply unserious about confronting the cartel threat. While assassinations are rampant, and the cartels have emerged as parallel governments in some areas, President Andrés Manuel López Obrador’s “hugs, not bullets” approach is laughable.

It says everything about Mexican political priorities that the Mexican Air Force is able to spirit away Bolivia’s recently ousted leftist president — but unable to render support to Mexico’s own ground forces in the skies over Culiacan, where the Sinaloa cartel recently defeated the Mexican military in a pitched eight-hour battle.

John Davidson, who has been reporting on the Mexican collapse for us at The Federalist, described the scene: “Armed with military-grade weapons and driving custom-built armored vehicles, cartel henchmen targeted security forces throughout Culiacan, launching more than one dozen separate attacks on Mexican security forces.”

The cartel men “captured and held hostage eight soldiers, then kidnapped their families. Amid the fighting, an unknown number of inmates escaped from a nearby prison. At least eight people were killed and more than a dozen were injured.”

This is how bad things are.

Designating the cartels as terror organizations recognizes the gravity of this situation and represents the first serious step America has taken since the Merida Initiative, the US-Central American security agreement formed in 2008. But it isn’t enough for the cartels to feel the financial pain — the Mexican elites who protect them have to, as well.

In much the same way the United States has targeted individuals connected to regimes like Iran, we ought to target the Mexican elites who do business with the cartels. They depend on access to our institutions for banking, health care and the education of their family members. They hold significant assets in the United States. All this can be taken away.

In his 2011 book, “Mañana Forever,” former Mexican Foreign Minister Jorge Castañeda makes clear that to understand Mexican history, you must realize that the Mexican people lack the rule-of-law and civil-society networks that are crucial to self-government.

Instead of the lateral social bonds so crucial to the success of the United States, in Mexico bonds are formed upward and downward, creating a patronage society that fosters corruption and invests power in the elite.

The situation requires motivating the Mexican elites to reverse course and fight the cartels, as the Mexican people deserve. In the absence of such motivation, nothing will change.

As a candidate, Donald Trump was a frequent critic of America’s far-flung wars. As president, he has adopted an approach that often puts him at odds with the views of the foreign-policy establishment. Now the violent action of the cartels presents him with an opportunity to please the more hawkish wing of his party while grappling for the first time in a generation with the broken nature of the Mexican state.

Trump has been inaccurately described by some of his critics as isolationist or antiwar. He is not, and he shouldn’t be understood ­under that lens. He is instead cut from the Jacksonian cloth, and he cares the most about the foreign-policy issues that hit closest to home.

After the success of the raid that killed ISIS honcho Abu Bakr al-Baghdadi, the president should understand the power of sending a message to our enemies: If you murder American women and children, wherever you are, wherever you hide, the most powerful military in the history of the world will hunt you down, find you and deliver swift justice to you.

The choice for the Mexican government now is stark. It can govern Mexico, the cartels can govern Mexico or the United States can step in, in its own unique way, and do what Mexican elites won’t do.

Benjamin Domenech is publisher of The Federalist.

Twitter: @BDomenech