Beto O’Rourke — the losing Texas candidate for the US Senate who bootstrapped his way into becoming a losing presidential candidate — had a message for refugees who had come to America: Your new country is a hellhole.

The former congressman told a roundtable of refugees and immigrants in Nashville last week: “This country was founded on white supremacy. And every single structure that we have in this country still reflects the legacy of slavery and segregation and Jim Crow and suppression.”

Just in case the newcomers were inclined to believe that they had escaped to the greatest country on Earth — an open, dynamic, generous society that, whatever their struggles now, will afford them opportunities unimaginable back home — Beto was there to tell them of all its sins.

He had made himself into an instrument of woke assimilation.

This is the backdrop of the controversy over Ilhan Omar, the Somali-born left-wing member of Congress whom President Trump urged, in particularly noxious tweets, to return to her native country and fix it before presuming to tell us what to do.

It’s a mistake, though, to think that Omar is anything other than on her way to total assimilation, only on the terms set out by Beto O’Rourke.

America has two assimilation problems. One is immigrants feeling only a tenuous connection to America and getting isolated in ethnic enclaves. The other is immigrants like Omar — and some of her second-generation colleagues — assimilating into the America of identity politics and grievance.

They have learned to speak not just English but the language of oppression. They understand our system — at least no less than the average officeholder — but hold it in low regard. They know our history, as taught by an instructor cribbing from Howard Zinn.

They may be citizens, but they are certainly outraged victims.

According to a profile in The Washington Post, Omar felt betrayal immediately upon getting to America.

“I arrived at the age of 12 and learned that I was the extreme other,” she explained, noting bullying when she was in school in Arlington, Va., an affluent Washington, DC, suburb. “I was black. I was Muslim. I also learned I was ­extremely poor and that the classless America that my father talked about didn’t exist.”

Somehow, despite all the depredations, she gained a seat in Congress. It wasn’t peans to her new home that paved her way, but the tropes and priorities of a progressive left, as you’d expect from a former director of the Women Organizing Women Network.

Omar doesn’t represent a majority-minority district. She started her elected career, as The Washington Post puts it, by getting to know “older peace-and-justice hippies.”

She attended Black Lives Matter protests and established relationships with all the left-wing groups in Minneapolis.

Most of these people wouldn’t object to, indeed would welcome and expect, her adversarial posture toward the country where she gained more notoriety and power than the vast majority of the native-born.

Her narrative is the narrative of American malignancy. The Washington Post wrote of her ambush of Trump official Elliott Abrams at a hearing: “For decades people like her had been on the receiving end of US foreign policy. Such people typically get ‘beaten into submission,’ she said. Now, Omar was the one delivering the beating.”

Her default is to blame America first. She explained that local Somali Americans attempted to join the Islamic State as a function of “systemic alienation.” She contends that she has met American veterans “who say the most horrendous things, who have complete disregard for life.” And she has accused her congressional colleagues of singling her out for demonization.

Anyone who thinks these attitudes are alien to the United States has never been to a modern college campus or watched MSNBC.

In short, whatever foolhardy things Trump may tweet, Ilhan Omar is not suited to return and fix Somalia — rather to join a segment of the American elite.

Twitter: @RichLowry