Want to listen to this article out loud? Hear it on Slate Voice.

Earlier this summer, Rep. David Schweikert, a Republican congressman from Arizona, delivered some hard truths to a session of the House of Representatives. “We have a math problem, and it is based on demographics,” Schweikert said on June 28. “I am a baby boomer. There are 76 million of us who are baby boomers, who are heading towards retirement. That demographic curve is changing the cost structure of government.”

This was back during that precarious period when Obamacare repeal-and-replace efforts had succeeded in the House but hadn’t yet floundered in the Senate, and Schweikert was lending voice to an aspect of the legislative push that had gone more or less unsaid, at least in public. To austerity-minded policymakers, the Better Care Reconciliation Act represented an exceedingly rare opportunity—“once in a lifetime,” wrote Grover Norquist—to rein in Medicaid spending before the U.S. population grew significantly older and more reliant on public funds. “It is time for almost revolutionary thoughts,” Schweikert said. “We need to look at the budget holistically.”

Between Schweikert’s take on the future solvency of Medicaid, Medicare, and Social Security and the ongoing efforts of President Trump and congressional Republicans to push the BCRA into law, Republican policymakers have demonstrated real concern about the economic dependency of the old and sick on the young and gainfully employed. Which is, from a certain point of view, fair enough: The Republican Party, at least in its platonic form, exists to limit government’s reach, and our aging population, it could be argued, may force that reach to extend. It would be strange if no Republicans pushed back.

And perhaps that was why it was so peculiar when, a little more than a month after Schweikert’s demographics lesson, President Trump announced he would embrace the RAISE Act, a legislative one-two punch co-sponsored by Sens. Tom Cotton of Arkansas and David Perdue of Georgia, also staunch supporters of the Republican health care effort. RAISE, if signed into law, would change the admissions criteria for legal immigrants and, more concerning from a demographics perspective, reduce their numbers by half within a decade. To the limited extent that the American working-age population continues to grow, immigrants are responsible. And so, for leaders of a party with clear apprehensions regarding the ongoing ability of the country’s workers to support its older adults, slashing legal immigration would seem, to put it gently, inconsistent.

President Trump has weathered charges of inconsistency before, but this time may be different. His campaign promise to make America great is in a category of its own—the ur-promise from which all his other promises descend. And the passage of RAISE will likely violate it in a very tangible way.

It’s not just that the legislation’s legal-immigration cuts would damage the economy, a fact most economists affirm. It’s that RAISE would hurt the American economy relative to the economies of other countries. And for those who want America to be first in all things, that outcome may prove difficult to stomach.

The cuts entailed by RAISE aren’t extreme—at least, not by international standards. They would not put us in the hermetic company of Japan, which admits very few new permanent residents, or lump us in with Switzerland and Denmark, where new immigrants must pay a high ticket price for admission, sometimes out of future wages. Even under this new proposed policy, the U.S. would still accept more newcomers, in raw terms, than any other country except perhaps Germany. (On a per-capita basis, however, the U.S. is nowhere near the top of the list of immigration-friendly countries.)

But even if such a policy wouldn’t make the U.S. an immigration outlier, it would still be a spectacularly regrettable unforced error. In fact, it’s such a bad move precisely because it would put the U.S. on a level footing with more restrictive countries. As it stands, immigration is granting America an underappreciated edge that it would be a mistake to blunt.

Populations around the world are aging—in some cases, with alarming speed—for three reasons. Birthrates in the vast majority of the world’s nations have fallen since the middle of the 20th century. (In some countries, such as India, Mexico, and Brazil, birthrates have outright plummeted.) That means fewer younger people. At the same time, life expectancy has risen, and despite recent, well-publicized downticks in the U.S., the overall trend continues to point north. Finally, in some of the countries that were heavily involved in World War II, an enormous cohort of baby boomers is just now crossing into retirement age.

As a result, by 2030, more than 20 percent of the U.S. population will be age 65 or older, a demographic breakdown slightly older than that of today’s Florida. Germany, Greece, Italy, Portugal, Sweden, and many other wealthy countries have already achieved Floridian status, and Japan is ranging far ahead with a quarter of its population aged 65-plus. On the balance, societywide aging is a good thing—in our opinion, every extra year of life is a gift—but it still poses serious challenges beyond even the monumental-yet-crucial task of maintaining a safety net for older adults. One inevitable consequence of global aging is the shrinking of labor pools and even, in select countries, the waning of entire populations. China, Japan, Russia, much of Eastern Europe, and many other countries are now either experiencing population decline or will begin it soon.

The very real possibility of such trends manifesting in either the raw or working-age populations of the U.S. should alarm anyone who claims an interest in American greatness. Consider, for instance, yet another stated priority of President Trump: infrastructure construction. Baby boomer retirement is hitting the construction industry hard, and taking with it able bodies and institutional knowledge. Positions in the skilled trades, such as machinists, welders, electricians, and HVAC technicians, were ranked the hardest for employers to fill in 2016 according to a survey conducted by staffing company Manpower. Such shortages will only worsen in the coming years as retirements accrue. Adecco, another staffing company, estimates that retirements in the aforementioned fields as well as general construction; mechanical, electrical, and industrial engineering; plumbers and pipefitters; and others will mean that 31 million skilled-trade positions will be left unfilled by 2020, almost a tenth of the population of the United States. As a result, contractors will have to either turn down jobs, slowing growth, or else raise their wages and therefore their rates, an expense that would likely be passed along to taxpayers in the event of a major infrastructure push.

And that’s just the construction-related industries. Others facing mass retirement include the petrochemical, defense, transit, agriculture, financial advisory, and railroad industries. Air-traffic controllers, hired en masse after Ronald Reagan fired their predecessors in 1981, are now retiring en masse. The ranks of doctors and nurses—especially internists and, in an unfortunate twist, geriatricians—are also thinning. Even the Hoover Dam, perhaps the country’s most quintessentially American piece of infrastructure, is now running short of workers qualified to operate its machinery.

Despite ongoing, frenzied discussions of the potential for advanced automation to take American jobs, these crucial shortfalls continue to go overlooked. U.S. companies are already finding it difficult to entice the staff they need, as Slate’s Daniel Gross has written. Who, in the next two decades, will run our economy and grow our food? It’s not just a matter of retraining those currently unable to find work. The economy is already at or near full employment, and at a certain point, the U.S., like other aging nations, will simply need more warm bodies.

Japan is quietly addressing its labor shortage by admitting foreign workers as temporary “trainees.” Germany is attempting to stall an incipient population decline by increasing its acceptance of immigrants and refugees. (Both countries are also finding ways of keeping older workers happy in their longtime jobs, from adopting exotic exoskeletons to making workplace ergonomic adjustments—a strategy that would also benefit the U.S.) Meanwhile, China, poised to experience the largest demographic swing of any nation, is losing millions of people from its workforce every year. The resulting spike in wages is one possible explanation for why President Xi Jinping recently laid off 300,000 troops from the country’s armed forces.

In the United States, the birthrate is 1.9 children per woman, slightly below the replacement rate of roughly 2.1. Thanks only to the twin inputs of immigration and the relatively large size of new immigrant families, the U.S. population is still growing slowly and stably. Without immigration, however, the population would begin to fall as soon as 2040, according to unpublished data supplied to us by Jeffrey Passel, a senior demographer at the Pew Research Center. (The projection, originally made in 2015, assumes that immigration would have been cut off starting that year.)

Thanks to its current inflow of immigrants, the U.S. has, and will continue to have, one of the youngest populations among wealthy nations. That relative youth equates to a better-than-average (though still troubling) ratio of workers to nonworkers and, at least in theory, a good crop of workforce replacements for baby boomer retirees. Without immigrants, however, we would be staring cross-eyed down the barrel of a far more threatening demographic future, filled with economic malaise, higher taxes, and even disastrous cuts to Medicaid, Medicare, and Social Security.

Legal immigration has become a partisan issue, but it shouldn’t be. Economists might disagree about whether to adopt a system that prioritizes highly skilled immigrants, as the RAISE Act proposes. (It’s worth mentioning, however, that the RAISE Act’s salary rules would keep out home-health aides, which the aging United States will soon need in droves, as Vox’s Sarah Kliff recently pointed out.) But there is broad agreement that slashing the raw number of immigrants to the U.S. would be an economic mistake. Immigration has been shown to have little to no effect on wages for native-born workers, and has even been called an “economic boost” by the George W. Bush Foundation.

Congress understands the stakes involved in cutting off America’s youth supply. Schweikert even mentioned it in his June 28 speech: “You do understand, as a nation, we functionally have zero population growth without immigration?” Though population aging may not be news to our political leaders, the question of whether they will prioritize the economic competitiveness of the nation over nativism remains open. We get it: There are people in this country who just don’t like immigration. But presumably a lot of those same people would feel more comfortable living in a world where America, bolstered by a healthy economy and a workforce strengthened by legal immigration, retains its geopolitical clout. As it stands, the world at large is sending the United States a precious resource—young people—free of charge. You can want an America with far fewer of these immigrants, or you can want America to be great. In this era of population aging, however, you can’t have both.