Almost as an afterthought near the end of his nationally televised address on what he calls the “border crisis,” President Donald Trump remembered his black and Hispanic constituents and what’s good for us _ as he sees it.

“(A)ll Americans are hurt by uncontrolled illegal migration. It strains public resources and drives down jobs and wages,” he said from behind his Oval Office desk. “Among those hardest hit are African-Americans and Hispanic Americans.”

As an African-American who cares about closing income gaps between advantaged and disadvantaged groups, I appreciated the shoutout, even if it seemed to contradict his usual sunny boasts about black and Hispanic employment climbing to record highs under his watch.

History shows the public tends to turn against immigrants at times of high unemployment, quite the opposite of the currently vigorous national employment rates.

It’s only fair to mention that the upward trajectory of black, Hispanic and every other group’s employment rates has continued a climb that began under President Barack Obama, six years before Trump took office.

With that in mind, Trump’s highlighting unemployed black and Hispanic workers as victims of illegal immigration unfortunately suggests a new version of an old sneaky divide-and-conquer political tactic: Turn one disadvantaged group against another through half-truths and stereotypes.

While there is little argument that a growing percentage of low-skilled immigrants undercuts the job supply and pay for low-skilled Americans, some researchers also have found that an increase in the labor supply through immigration often generates more jobs in the long run.

A 2016 University of Pennsylvania study, for example, found more jobs generated in home construction and food production. As Treva Lindsey, an Ohio State associate professor in women’s gender and sexuality studies, told The Washington Post, “Simply put, more demand for goods and services means greater demand for those providing those goods and services.”

Yet, the health of that job-creating engine is hardly helped by the fact that 800,000 government workers’ paychecks are held up by the partial government shutdown, which was triggered by deadlocked negotiations over the president’s proposed border wall.

Whatever. Trump’s insistence on a barrier in his pitch to racial and ethnic minorities sounds better suited to 1919 than 2019. During the Industrial Age, black leaders such as Booker T. Washington, W.E.B. DuBois and Marcus Garvey occasionally spoke out against immigration, mainly against the preference by too many industrialists for immigrant labor instead of training and employing native-born black Americans.

In war and peace, blacks often were the “last hired, first fired,” as an old saying of the civil rights movement goes, unable to enjoy the benefits of long-term employment except as a last resort.

As opportunities in employment, job training and union membership opened up nationwide, particularly in the civil rights revolution of the 1960s, black leaders found it made more sense to ally with other ethnic groups to try to expand opportunities for everyone. Black Americans did not invent what is often called “identity politics” today. They only found ways to turn it into a tailwind for progress instead of a headwind against their aspirations.

You can see the impact of that shift in polls such as one taken by Lake Research Partners in 2013, which found that 66 percent of African-Americans favored a pathway to citizenship for immigrants, including the undocumented, quite the opposite of Trump’s hard-line, build-that-wall approach.

And need I mention that black and Hispanic voters overwhelmingly supported Hillary Clinton over Trump _ 89 percent of black voters and 66 percent of Hispanic voters _ and his message to African-Americans of “What have you got to lose?” As we have seen under Trump’s divisive policies, they could lose a sense of unity as Americans around a commonly shared American dream of opportunity.

If anything, most voters _ minority and otherwise _ want to see some sort of comprehensive immigration reform that improves border security and also resolves the unsettled status of law-abiding immigrants who already are here with some sort of pathway to legalization _ beginning with the “Dreamers” who were brought here without documents as children.

That’s the real issue behind the current border wall standoff. President Trump has shown himself to be tone-deaf or sadly indifferent to the need for compromise and consensus in our very diverse country on those broader issues. He apparently prefers to win by division more than addition.