When the news stories began to surface last month of sobbing young migrant children being forcibly removed from their parents at the border, many close White House watchers instantly suspected Stephen Miller was behind it.

Though he keeps a relatively low profile compared to the cast of camera-muggers and Twitter warriors in President Donald Trump’s orbit, the 32-year-old speechwriter and senior adviser has cultivated a reputation as the most strident immigration hawk in the West Wing. So, it came as little surprise when The New York Times reported over the weekend that Miller had played a key behind-the-scenes role in advancing the new border policy:

“No nation can have the policy that whole classes of people are immune from immigration law or enforcement,” he said during an interview in his West Wing office this past week. “It was a simple decision by the administration to have a zero tolerance policy for illegal entry, period. The message is that no one is exempt from immigration law.” … Privately, Mr. Miller argued that bringing back “zero tolerance” would be a potent tool in a severely limited arsenal of strategies for stopping migrants from flooding across the border … And in April, after the border numbers reached their zenith, Mr. Miller was instrumental in Mr. Trump’s decision to ratchet up the zero tolerance policy.

But while Miller’s influence on this issue is a matter of documented fact, his motives remain somewhat murkier. Why exactly is he using his perch to champion a measure that’s so unpopular that it’s opposed by fully two-thirds of Americans? Theories abound, of course—ranging from ideology to incompetence to xenophobia—but they are almost all products of distant speculation.

I spent a significant amount of time earlier this year reporting on Miller for a recent profile in The Atlantic. In addition to interviewing friends, allies, enemies, and associates, I sat down for a lengthy interview with him in late March. At the time, the forced family-separation policy had not yet been implemented. But our conversation illuminated the grim calculus that seems to underlie the border strategy Miller helped shape.

First, it should be understood that Miller’s hardline approach to immigration predates his work for Trump. In 2013, as an aide to then-Senator Jeff Sessions, Miller made his name on Capitol Hill fighting ferociously against a bipartisan immigration-reform bill alongside populist-right media allies like Breitbart News. The effort to sink the legislation prevailed, and his credentials as a true-believing ideologue were secure. He is, by all accounts, an avowed restrictionist, and he likely believes that separating children from their parents at the border will deter future illegal immigration.

But when we talked, Miller also made it clear to me that he sees immigration as a winning political issue for his boss.

“The American people were warned—let me [be] sarcastic when I remark on that—[they] were quote-unquote warned by Hillary Clinton that if they elected Donald Trump, he would enforce an extremely tough immigration policy, crack down on illegal immigration, deport people who were here illegally, improve our vetting and screening, and all these other things,” Miller told me. “And many people replied to that by voting for Donald Trump.”

Skeptics will note that most Americans did not, in fact, vote for Donald Trump, and that polls continue to show widespread disapproval of some of his signature immigration positions. But it doesn’t matter. In Miller’s view of the electoral landscape, the president is winning anytime the country is focused on immigration—polls and bad headlines be damned. (This explains why Miller is, according to Politico, leading an effort within the administration to plan additional crackdowns on immigrants in the months leading up to the midterm elections.)

Speaking to The New York Times, Miller framed his theory this way: “You have one party that’s in favor of open borders, and you have one party that wants to secure the border. And all day long the American people are going to side with the party that wants to secure the border. And not by a little bit. Not 55–45. 60–40. 70–30. 80–20. I’m talking 90–10 on that.”

Of course, if the goal were simply to draw voters’ attention to the border, there are plenty of ways to do it that are less controversial (not to mention, less cruel) than ripping young children from the arms of asylum seekers and sticking them in dystopian-looking detention centers. But for Miller, the public outrage and anger elicited by policies like forced family separation are a feature, not a bug.

A seasoned conservative troll, Miller told me during our interview that he has often found value in generating what he calls “constructive controversy—with the purpose of enlightenment.” This belief traces back to the snowflake-melting and lib-triggering of his youth. As a conservative teen growing up in Santa Monica, he wrote op-eds comparing his liberal classmates to terrorists and musing that Osama bin Laden would fit in at his high school. In college, he coordinated an “Islamo-Fascism Awareness Week.” These efforts were not calibrated for persuasion; they were designed to agitate. And now that he’s in the White House, he is deploying similar tactics.

Take the travel ban, for example. During Trump’s first week in office, Miller worked with Steve Bannon to craft an executive order banning travel to the United States from seven majority-Muslim countries. Trump signed the order on a Friday afternoon, unleashing chaos at airports across the country, complete with mass protests, wall-to-wall media coverage, and a slew of legal challenges. Afterward, Bannon reportedly boasted that they had enacted the measure on a weekend “so the snowflakes would show up at the airports and riot.”

As public backlash has intensified in recent days against the new border policy, Trump administration officials have predictably struggled to formulate a coherent, unified defense. Amid all the bumbling recriminations and shifting talking points, one can sense in some of these officials a natural response to the situation developing at the border—if not shame, then at least chagrin.

But for Miller, it seems, all is going according to plan—another “constructive controversy” unfolding with great potential for enlightenment. His bet appears to be that voters will witness this showdown between Trump and his angry antagonists, and ultimately side with the president. It’s a theory that will be put to the test in November. In the meantime, the heartrending orchestra on the border will play on.