President Donald Trump has named Stephen Miller, the architect of his hardline immigration policy, as his new chief of staff following historic losses in the US midterm elections.Miller replaces Susie Wiles, who submitted her resignation after Republicans lost control of both chambers of Congress, delivering a blow to the prospects for Trump’s agenda in his final two years in the White House.Speaking to reporters, Trump said Wiles had “done a very good job”, but “we’ve got to make moves sometimes”.Miller, a Trump loyalist and deputy chief of staff who served as a senior adviser during his first administration, is set to take on the new role on Monday.One of Trump’s closest aides, Miller, 41, stuck by the president following his 2020 election defeat and followed Trump back into power last year.On X, Miller called Trump “the most transformative political leader in American History” who has “single-handedly saved America from those who would destroy it”.He thanked Wiles for her years of devoted service to the president, country and for her friendship.“The mission now is more clear than ever: Fight with all of our soul to support our President and defend this magnificent Republic,” he wrote.Wiles gave her resignation to Trump on Thursday night, a US official told CBS News, the BBC’s media partner. Three sources told CBS she quit because of the election losses.Trump said in a statement that Wiles would be moved to the “Trump Political Operation”. He told reporters that Miller “gets it, very good politically”.Wiles said being on Trump’s team was “the honor of a lifetime”.“I’m so proud to have been a part of what we’ve accomplished together,” she said.“While my role may be changing, my commitment to the President and the mission never will,” she added.It was unclear if her deputies would remain at the White House.Wiles, 69, is seen as among the most powerful figures in the Trump administration and someone particularly close to the US president.Asked last month whether Wiles could be replaced soon, Trump said there was “zero chance”.“Susie is here and she’s gonna be here for a long time,” he said.Wiles recently had cancer, announcing in September, six months after her diagnosis, that she was in remission.Miller, on the left, and Wiles on the right, earlier this yearWiles, 69, is seen as among the most powerful figures in the Trump administration and someone particularly close to the US president.Asked last month whether Wiles could be replaced soon, Trump said there was “zero chance”.“Susie is here and she’s gonna be here for a long time,” he said.Wiles recently had cancer, announcing in September, six months after her diagnosis, that she was in remission.Wiles is most senior person to leave after midtermsWiles had planned to stay in her role until the end of the year or early next year, sources familiar with her thinking told CBS News.However, the president accelerated her departure, the sources said.Wiles is not the only Trump administration official to leave following this week’s midterm elections, which have prompted a reckoning among Republicans about how to address voters’ rebuke of Trump’s agenda.Several Department of Justice (DOJ) officials who carried out some of Trump’s top priorities have also resigned since Republicans’ sweeping losses in Tuesday’s midterm elections.Harmeet Dhillon, the chief of the civil rights division, which focused on non-citizen voting and eliminating diversity, equity and inclusion (DEI) initiatives, stepped down on Thursday. She also put a greater focus on protecting gun owners’ rights and adopted legal positions that opposed civil rights protections for transgender people.John Eisenberg, head of the department’s National Security Division, who had also worked in Trump’s first administration, investigated media leaks and led the division that redacted millions of pages of federal files related to convicted paedophile Jeffrey Epstein.Jason Reding Quiñones, a US attorney in Florida, was at the centre of Trump’s efforts to use the DOJ to prosecute perceived political foes. He investigated earlier criminal probes into Trump’s handling of classified documents after he left office in 2021 and his campaign’s contacts with Russia in the 2016 election.Who is Stephen Miller?Asked why he elevated Miller to chief of staff, Trump told reporters on Friday: “Stephen’s been with me from the beginning. He gets it, very good politically … and he’s a very good manager. He’ll do a great job.”Democrats took to social media to criticise Miller as Trump’s new pick, accusing the president of doubling down despite voters’ anger with his party’s agenda.Democratic Congressman Robert Garcia, who would lead the House Oversight Committee when the party takes control of the chamber, said he would continue to investigate Miller and his “misconduct”.“Stephen Miller is the architect of the unconstitutional ICE raids that have terrorized our communities and kidnapped and killed American citizens and immigrant families,” he said, referencing US Immigration and Customs Enforcement.Democratic House Minority Leader Hakeem Jeffries said Miller was “a dangerous xenophobe and reckless extremist who has American blood on his hands”.“His presence in government should be eradicated like a malignant tumor,” he said.Trump administration communications director Steven Cheung praised Miller.“There is no bigger advocate for the Trump agenda than Stephen, and he will help the Administration deliver on monumental victories for the rest of this historic second term,” he said.Miller comes from an Ashkenazi Jewish family in Santa Monica, California. In high school, he developed a taste for politics and voiced controversial opinions.He attended Duke University in North Carolina and, in 2009, became an aide to ultra-conservative Alabama Senator Jeff Sessions, the first senator to endorse Trump.During this time, Miller developed his hardline immigration policies and worked to kill a bipartisan immigration reform bill. He joined Trump’s presidential campaign in January 2016 and has been loyal since.Miller spearheaded Trump’s use of executive orders to advance his agenda, staunchly defending the administration’s use of executive power.He championed “zero-tolerance” family separations, drove policies behind travel bans during Trump’s first term, advocated for third-country deportations and urged immigration officials to make up to 300 arrests a day.A staunch supporter of Israel, Miller has also been hawkish about the US and Israel’s joint military action in Iran.