In the early days after Republicans’ stunning rebuke in Tuesday’s midterm elections, President Trump seemed subdued, almost conciliatory. He said he would work with Democrats, saying, as he has over the years, that he could forge a deal with them on immigration, perhaps the most polarizing domestic issue of his second term. But near the end of the week, instead of bowing to clear evidence of voter discontent, Trump pivoted toward a familiar measure: more MAGA. On Friday, the president removed his former close adviser, Susie Wiles, from the position of White House chief of staff, replacing her with Stephen Miller, his deputy chief of staff. More than any other top adviser, Miller encouraged an aggressive exercise of executive power when Trump returned to office. Miller has been the driving force behind the president’s most forceful actions, including the use of increasingly hostile tactics to round up migrants across the country and the bombing of small boats in the Caribbean Sea and eastern Pacific Ocean that he and Trump declared constituted a foreign invasion. The president’s election sent a clear signal about the stance he intends to take in his final two years in office and how little he intends to alter his approach in response to the most decisive political defeat in half a century. It also put center stage a figure who had already been a galvanizing target for Democrats determined to use their new powers in Congress to rein in the administration. In a social media post, Miller praised Trump as “the most transformative political leader” in American history, saying he had single-handedly “saved America from those who wanted to destroy it.” “The mission is now clearer than ever: fight with all our soul to support our president and defend this magnificent Republic,” he added. Miller said he had shown no interest in reaching a compromise with congressional Democrats and was ready for a fight over subpoenas and investigations expected to emanate from Capitol Hill. Their top priority, they said, is to rebuild the fractured MAGA coalition and implement policies that energize the voters who elected Trump in 2024. “Stephen is and always has been the eternal flame of the MAGA movement: putting the president’s words and policies into action,” Hunter Morgen, who worked as Miller’s deputy during the president’s first term and is now a lobbyist at Ballard Partners, wrote in a text message. While Wiles made clear that Although he did not consider it his job to protect the country from the president, as some of his top advisers did during his first term, Miller is much more willing than ever to cross legal boundaries. He knows how the levers of government work. He is one of two senior West Wing staffers who were part of the first administration when the House majority flipped in 2018, triggering a flurry of congressional subpoenas. Miller spent the years between Trump’s two terms recruiting a team that would help him implement a broad agenda once he returned to power. Today, he has allies among lawyers at key agencies across the executive branch, as well as an ongoing dialogue with Attorney General Todd Blanche and Secretary of Defense Pete Hegseth. Hegseth celebrated Mr. Miller’s promotion with several social media posts. “BIG CONGRATULATIONS,” he wrote, calling Mr. Miller “a true patriot and fighter for America First.” He followed up with a post that said, “Patriots in control,” and a subsequent post that included a photo of him and Miller. Still, Miller’s allies have indicated that he understands that the Iran war has been a political disaster and believes the president needs to return to policies that are popular with the MAGA base. While Wiles may remain in Trump’s orbit by moving into the president’s external political operation in an as-yet-undefined role, his departure and Miller’s elevation will fundamentally change the circle of advisers around the president as the White House absorbs the impact of the midterm elections. “I wanted to make a change,” Trump told reporters as he left the White House for a trip to Florida. Ms. Wiles did a “great job,” he said, but added: “Sometimes in life, you have to take action.” Asked what he wanted Mr. Miller to do differently from Ms. Wiles, who he had previously claimed was going nowhere, the president said: “Just manage things well.” Wiles, the first woman to hold a senior West Wing position, played a central role in President Trump’s return to power. Credit… Doug Mills/The New York TimesMr. Trump, both in his private conversations and in his public comments, has not accepted blame for the election results. Instead, he repeatedly criticized Wiles and his other political advisers, insisting that he received poor service in the run-up to the midterm elections. He criticized Ms. Wiles in front of several people at an election viewing party in the East Room on Tuesday night, according to people with knowledge of the incident, who spoke on condition of anonymity to describe internal conversations. Trump has also privately criticized Wiles ally James Blair, who ran the president’s foreign policy operation, people with knowledge of the comments said. Trump publicly expressed his confidence in Ms. Wiles in recent months. But behind the scenes, there were signs that his standing with the president was shaky, according to officials with knowledge of the dynamics. He has berated Ms. Wiles in front of other staff members over his frustration that his administration has not acted more quickly to find people he labels “leakers,” as well as stalled prosecutions of his alleged political enemies, they said. Before several advisors, he would accuse her of being among the leakers. Trump began excluding Wiles from hiring decisions, even as he chose an inexperienced television expert to replace outgoing press secretary Karoline Leavitt. Wiles’s allies described her as willing to leave her position and uninterested in fighting to stay there. Her supporters saw the criticism of her as an effort to place blame on a political strategy largely driven by Trump himself. And they blamed her detractors inside and outside the administration for spreading information intended to harm her with Trump, including stories about her daughter’s lobbying work. In his own statement posted on social media, Wiles described working for Trump in the White House as the “honor of a lifetime.” The first woman to serve in the top staff position in the West Wing, Wiles helped lead Trump to his 2024 election victory, playing a central role in his return to power four years after his loss to Joseph R. Biden Jr. She was diagnosed with breast cancer in early 2026. Wiles remained in her position while she began treatment and recently announced she was cancer-free. Wiles came to office having established a relationship with Trump and a level of trust that none of his four chiefs of staff in his first term had enjoyed. He tried to influence their decisions on central issues, including the immigration crackdown, even if only marginally, according to people with knowledge of his role. She pushed for the appointments of Secretary of State Marco Rubio and Treasury Secretary Scott Bessent, and many outside the government have seen both as stabilizing figures. But Trump has relied mostly on his own instincts this term, and few advisers have engaged him in the kind of direct confrontations over policy that characterized his first administration.