Kirstjen Nielsen has resigned as secretary of the Department of Homeland Security amid President Donald Trump’s growing frustration with her handling of immigration policy. Trump tweeted Sunday that Nielsen will be leaving her position. The president said that Kevin McAleenan, the commissioner of U.S. Customs and Border Protection, will become acting secretary.

Secretary of Homeland Security Kirstjen Nielsen will be leaving her position, and I would like to thank her for her service.... — Donald J. Trump (@realDonaldTrump) April 7, 2019

Nielsen later confirmed in a tweet that she submitted her resignation and will stay on as secretary through April 10 to help with the transition. She added that it’s “been an honor of a lifetime to serve with the brave men and women of [DHS].”

Its been an honor of a lifetime to serve with the brave men and women of @DHSgov. I could not be prouder of and more humbled by their service, dedication, and commitment to keep our country safe from all threats and hazards. pic.twitter.com/lIQ5iqGDmF — Sec. Kirstjen Nielsen (@SecNielsen) April 7, 2019

“I hope that the next Secretary will have the support of Congress and the courts in fixing the laws which have impeded our ability to fully secure America’s borders and which have contributed to discord in our nation’s discourse,” the letter stated. Nielsen’s departure follows several high-profile conflicts that embroiled the department, including the public outcry last year over the Trump administration’s family separation policy. The secretary had reportedly clashed in private with Trump over the practice of taking children away from parents who cross the U.S.-Mexico border without documentation. But Nielsen publicly defended her department and denied that families were being separated at the border as a “policy.” “We will not apologize for the job we do or for the job law enforcement does, for doing the job that the American people expect us to do,” Nielsen told the National Sheriffs’ Association in summer 2018. “Illegal actions have and must have consequences. No more free passes, no more get-out-of-jail-free cards.”

We do not have a policy of separating families at the border. Period. — Sec. Kirstjen Nielsen (@SecNielsen) June 17, 2018

.@RepBonnie: What is a chainlink fence enclosed into a chamber on a concrete floor? A cage?@SecNielsen: It's a detention space, mam



REP BONNIE: Is it different from what you put dogs in?



NIELSEN: Yes



REP BONNIE: In what sense?



NIELSEN: It's larger



B: Sounds like a dog cage pic.twitter.com/hcIEv4zwrE — Aaron Rupar (@atrupar) March 6, 2019

Nielsen also positioned herself as a vocal defender of the Trump administration’s “zero tolerance” policy of prosecuting every person who crosses the border illegally, which was tied to the family separations. For that, she earned the president’s praise on Twitter. Late last year, Trump was reportedly preparing to fire Nielsen amid frustration with what he saw as her inadequate action on immigration, according to The Washington Post, which cited several current and former officials. But the secretary was a staunch advocate for Trump’s border wall during the 35-day partial government shutdown that ended earlier this year. The New York Times said at the time that her reputation within the White House had since improved. The secretary reportedly considered resigning in May 2018 after Trump berated her in front of other Cabinet members over what he perceived to be her failure to adequately crack down on illegal immigration. Several officials familiar with the episode told The New York Times that she drafted a letter of resignation at the time but never delivered it. Nielsen initially joined the administration as chief of staff to John Kelly during his tenure as homeland security secretary. She later served as Kelly’s deputy when he became Trump’s chief of staff. Trump nominated Nielsen as homeland security secretary in October 2017 and the Senate confirmed her in December. Her departure is the latest major shake-up in the Cabinet and follows Jeff Sessions’ resignation as attorney general, as well as those of Defense Secretary Jim Mattis and chief of staff John Kelly. Nielsen’s replacement, McAleenan, oversees the country’s largest federal law enforcement agency, with tens of thousands of CBP officers patrolling border crossings and entry points. He told lawmakers in December that his agents’ use of tear gas to stop a large number of migrants from crossing illegally was justified, according to The Washington Post. Rep. Joaquín Castro (D-Texas) previously said McAleenan should be fired after not immediately disclosing the death of a migrant child in Border Patrol custody. Some Democrats responded to Nielsen’s departure Sunday.

When even the most radical voices in the administration aren’t radical enough for President Trump, you know he’s completely lost touch with the American people. https://t.co/4hyz8VGwQv — Chuck Schumer (@SenSchumer) April 7, 2019