Thousands of Mexican seasonal workers legally cross the border daily from Mexico. (John Moore/Getty Images)

ONLY A month before President Trump started declaring that the country is “full,” and therefore incapable of absorbing Central American refugees flocking to cross the southern border, he said : “So we’re going to let a lot of people come in because we need workers. We have to have workers.”

Mr. Trump was speaking about legal immigration, which his administration has tried to curtail along with the illegal variety. Still, his remarks to the executives on the American Workforce Policy Advisory Board, a group co-chaired by his daughter Ivanka and Commerce Secretary Wilbur Ross, suggest the president knows his diagnosis that the country is full flies in the face of the facts — specifically, the economy’s severe and growing labor shortages, including for low-wage and blue-collar workers, across an array of industries and regions.

The impression of presidential cognitive dissonance was reinforced one day after Mr. Trump declared the country full, when his Department of Homeland Security announced it would nearly double the 33,000 guest worker visas it had planned to issue for employees this summer. The additional 30,000 visas, most of which will be issued to Mexicans and Central Americans, will fill jobs at hotels, amusement parks and landscaping firms that struggle to find adequate seasonal labor.

That stopgap is symptomatic of what has become a broader worker shortage across the U.S. economy, which faces a shrinking native-born labor force as baby boomers retire at a rate of 10,000 daily , unemployment reaches historically low levels, and immigration continues to dwindle from Mexico, a traditional source of cheap documented and undocumented employees. In March, the Labor Department reported there were 7.6 million unfilled jobs and just 6.5 million unemployed people, marking 12 straight months during which job openings have exceeded job seekers.

The labor shortage is sapping growth as well as state and municipal revenue. Small businesses and major corporations have sounded the alarm as the delivery of goods is delayed by a drastic shortage of truckers, and housing prices in some markets are driven up by an inadequate supply of construction workers. Mr. Trump’s admission Friday that he will consider transporting new migrants to so-called sanctuary cities as a means of punishing those cities is probably an empty threat given the scheme’s blatant illegality. But if he were to fulfill the threat, he might do some of the cities an unintentional favor by providing them with badly needed workers.

The deficit is particularly acute in lower-wage jobs, as more and more Americans attend college and are reluctant to take positions in skilled trades and other jobs requiring manual labor. Home health aides who care for the sick and frail are in extremely short supply, as are workers in retail, restaurants and farms. The problem is exacerbated by a fertility rate — the number of children born per woman — that is the lowest since the 1930s . The impact of that decline until now has been partly offset by immigration.

The president knows this; hence his remarks to the industry executives in March. He also believes his most ardent partisans are inspired, and his interests served, by ceaseless rhetorical attacks on immigrants and policies to impede immigration. In this case, his political strategy is a prescription for long-term economic anemia and declining competitiveness.