In 1980, the year that Congress passed the Refugee Act, the U.S. accepted more than two hundred thousand refugees. The law created a robust program for accepting people who had been displaced by war and strife, and made refugee policy a new tool of American foreign policy, improving the country’s standing with foreign allies and helping the military and intelligence communities find partners in conflict zones. Since then, the mandated refugee “cap” set by the President has fluctuated; during the Obama Administration, it averaged seventy-six thousand, and, in 2017, Obama raised the cap to a hundred and ten thousand to allow in more Syrians fleeing civil war. Then came Donald Trump. In January, he signed an executive order temporarily freezing the refugee program, barring all Syrians, and slashing the number of refugees allowed into the country for the remainder of the year. Late last month, the White House announced that next year’s cap would be forty-five thousand, a record low. The State Department, the Defense Department, the Joint Chiefs of Staff, the Office of the Vice-President, and the Office of Management and Budget had wanted the number to be higher. But they had all been forced to compete with one influential White House official: Stephen Miller, the thirty-two-year-old former aide to Jeff Sessions who has become Trump’s top immigration adviser.

I recently spoke to four Administration officials involved in the refugee-cap process to try to understand how Miller was able to outmaneuver an array of powerful factions in the federal bureaucracy. Each official described Miller as a savvy operator who understands how to insert himself into the policy-creation process. They also described him as the beneficiary of a dysfunctional and understaffed Administration. Miller hadn’t completely gotten his way on the refugee cap, they told me; he wanted it to be lower. The forty-five-thousand figure—which past Administrations would have considered impractically low—amounted to a kind of compromise.

Miller, who has gone from the political fringe to the White House on the strength of his reputation as an anti-immigration ideas man, joined the Trump campaign early. He is close to both the President and his son-in-law, Jared Kushner, and has had a direct hand in several of the Administration’s most significant immigration decisions, including the travel bans and the cancellation of Deferred Action for Childhood Arrivals (DACA). “He’s been thoughtful and low-key about overtaking the policy-making process,” one White House official told me. “That’s the reason he survived.”

The chain of events that led to the announcement of the new refugee cap began on June 5th, when Miller met with officials from the State Department, the National Security Council, the Department of Homeland Security, and a policy group called the Homeland Security Council. Every summer, the State Department and the N.S.C. lead a series of discussions to decide the next year’s cap. Officials weigh dozens of different considerations, solicit input from the various stakeholder agencies, and ultimately bring a number to the President for his approval. The process is technical and exacting, a months-long slog through meetings, position papers, and constant recalibrations. Miller’s presence at the June 5th meeting itself was unusual: he heads the Domestic Policy Council, a body staffed by political appointees, which had never before played a role in refugee policy.

“We know how this used to go in the past,” he told the officials in the room. “But we also know that the President views this as a homeland-security issue.” Everyone understood the significance of Miller’s words. “Miller basically made clear that it was not going to be looked at from the typical lens of foreign policy,” a second White House official told me. “It was a domestic-policy issue, an immigration issue. The Department of Homeland Security was going to get involved.”

Miller introduced the officials to Gene Hamilton, another former aide to Sessions, whom the Administration had installed at D.H.S. This year, Miller and Hamilton explained, D.H.S.—not the State Department—would present the refugee-cap number to the President. Hamilton would be Miller’s key ally in the process. “They were in direct and constant contact,” the second White House official told me. “If there was ever a question you had for Hamilton, he’d say, ‘Hold on,’ and call Miller.” According to the first White House official, “It was clear that there was some precooked plan here.”

Miller’s presence was felt immediately. Records of the June 5th meeting, known as a “summary of conclusions,” were kept from circulating. Stakeholder agencies—including the Joint Chiefs, the Defense Department, the U.S. Mission to the United Nations, and the Office of Management and Budget—were left out of subsequent meetings. These meetings are an “art form” and “highly scripted,” one of the officials told me. “This was highly unusual. They were convening people without anyone knowing what the subject of the meeting was.” (The White House claims that Miller did not coördinate these meetings.) After one meeting, in August, N.S.C. and State Department officials expressed concern that representatives from the Department of Defense, the National Counterterrorism Center, and the F.B.I. were still missing from the discussions. Hamilton responded, “What the hell does D.O.D. have to say about this?”

When evidence emerged that didn’t suit Miller’s aims, he squelched it. In March, the White House had asked the Department of Health and Human Services to study the costs of refugee resettlement. The department returned with a study, in July, showing that the revenue generated by refugees in the form of local, state, and federal taxes exceeded the costs of resettling them by sixty-three billion dollars. According to the Times, Miller suppressed the study and demanded that H.H.S. recalculate the numbers. Two of the White House officials told me they’d heard that Miller had given H.H.S. strict instructions at the outset. “The President believes refugees cost more, and the results of this study shouldn’t embarrass the President,” he had told people at the agency. (The White House denied that Miller was involved with the H.H.S. report.)

“He shut down the U.S. government’s democratic approach to decision-making,” a State Department official told me. “He suppressed evidence that was important to consider in determining a refugee number that would be beneficial to our national-security interest. We’re not talking about reports written by outside groups. We’re talking about evidence being generated from within the federal bureaucracy, documents generated from within the government.” Miller and his team at the Domestic Policy Council heavily edited several discussion papers outlining policy considerations, according to one of the White House officials. Statistics were cherry-picked. “We’d get them back from D.P.C., and they were eighty-five-per-cent different,” the official said, referring to papers generated by the N.S.C. staff. “D.P.C. would just sit down and write their own paper. They put in a lot of spurious statistics. Things like: refugees are thirty times more likely than the general population to commit a terrorist act.” According to the official, many of the statistics Miller’s team favored came from the Center for Immigration Studies, an influential anti-immigration think tank. (The White House denied that Miller had a role in editing policy papers.) When officials pushed back against these kinds of changes, Miller would point to the backlog of asylum cases at D.H.S. and argue that the refugee program was unsustainable. All four officials believed this argument was disingenuous. “This was a manipulation to get the result he wanted,” one White House official told me. “He basically just had a political agenda: to limit the number of foreign nationals who come into our country.”