The Deferred Action for Childhood Arrivals program changed the lives of young people who came to the United States illegally as children in incredible ways — boosting high school graduation rates and college enrollment, while slashing teen births by a staggering 45 percent.

That’s according to timely new research from Elira Kuka, Na’ama Shenhav, and Kevin Shih that uses the program to study a larger question that’s of interest to economists — when education becomes more available, do people go get more of it? The DACA results suggest that the answer is yes, at least when there’s a clear upside. The program itself, in other words, was a smashing success in terms of bringing people out of the shadows and letting them contribute more to American society.

Oscar Hernandez, a DACA recipient, explained to Vox’s Dara Lind how things changed.

”The discussion in my house was, ‘You don’t get noticed. Because if you do something awesome and great, you might get noticed, and if you do get noticed, they might find out that we’re here undocumented, and if they find we out we could get separated.’ It was never a discussion we had, but that was the unwritten rule for our house. You don’t do bad things, but you also don’t do good things. You stay under the radar, you work, and that’s it.”

DACA changed that. Suddenly, recipients got to experience what US citizens take for granted — that to excel is good.

Canceling DACA almost certainly won’t reduce the overall size of the unauthorized population living in the United States, but it will meaningfully reduce the educational attainment and economic productivity of the undocumented population. That’s bad for the DREAMers, but also America as a whole.

DACA eligibility led to a lot more schooling

One of DACA’s provisions was that to qualify, you had to get a high school degree if you were old enough. That’s an unusual incentive to stay in school, and using a difference-in-differences design to compare the eligible to non-eligible population over time (you can do this because you had to have arrived within a specific time and age window to qualify) they show that DACA-eligibility increased high school graduation rates by 15 percent and brought teen births down by 45 percent.

a 45 percent reduction in teen fertility, pic.twitter.com/j3ibO4EgUr — Na'ama Shenhav (@shenhav_n) February 12, 2018

That’s interesting, but also a bit unsurprising — if you give people a huge carrot to finish high school, they become more likely to finish high school.

The more striking results: DACA-eligible women increased their college attendance rate by 25 percent, and even as DACA-recipients obtained more schooling, they worked more.

We find that these effects generated a large boost in productivity, as teens shifted from being idle to being in school and working part-time. pic.twitter.com/be9QHKCR3D — Na'ama Shenhav (@shenhav_n) February 12, 2018

These are important results, because formal protection from deportation isn’t just about avoiding deportation. It’s about no longer needing to make the need to avoid deportation structure your entire life.

An undocumented person without work authorization can find work to do, but it’s typically low-paid under-the-table work. Having a college degree doesn’t help you with those kind of jobs, and the kind of professional work that rewards higher education typically can’t be obtained by someone without legal permission to work.

The results on college attendance are showing us that DACA worked powerfully through this channel, making recipients feel that education would pay off and thus inspiring them to go get it. And even though enrolling in school means you have less time to work, DACA recipients enrolled in school actually started working more “indicating,” as the authors say “that the program generated a large boost in productivity.”

The point: Cancelling DACA is broadly harmful

Ending the program, as Trump is in the process of doing, will send this trajectory into reverse.

Some former DACA recipients will end up being deported. Most, however, won’t be. Not as an act of kindness from the administration but because the pace of removals is limited by the court system, which can only process so many cases per year. Making 700,000 more people eligible for deportation won’t increase the number of people who actually get deported. It will, however, deal a devastating blow to those 700,000 people’s ability to do professional work and proclivity to obtain an education.

They themselves and their families will obviously be the primary victims of this policy. But the economy will also suffer from a reduction in the productivity of its labor force — in lower tax revenue, business investment, and wages.

This is the essential paradox of Trump’s positioning on the issue. When he initially canceled DACA, it appeared he was seeking leverage in ongoing negotiations over potential funding for border security. But when Democrats proved willing to make substantial concessions on security, Trump upped the ante enormously and started demanding sweeping changes to US immigration policy, including huge cuts in legal immigration.

If Trump doesn’t get what he wants (which seems likely), then he’s going to be stuck implementing deportations of extremely politically sympathetic people, while somewhat diminishing an economic growth story that’s been the sunny part of his presidency — all without changing the number of unauthorized immigrants living in the United States at all.

DACA and similar initiatives tend to draw political support from the sense that its recipients, having come to the United States as children, “did nothing wrong” in crossing the border illegally. They have unusually strong ties to what is, at the end of the day, the only country they’ve ever known.

But the economic logic here makes the case for a broader path to citizenship. There are millions of unauthorized immigrants residing in the United States, and there will continue to be millions of them under any conceivable enforcement framework. Letting them obtain legal status will allow them to borrow and save, launch businesses, obtain educational credentials, and apply their job skills to maximum effect.