WASHINGTON, DC - MARCH 21:  Homeland Security Secretary Kirstjen Nielsen testifies before the Senate Intelligence Committee March 21, 2018 in Washington, DC. The committee heard testimony on the topic of election security during the hearing.  (Photo by Win McNamee/Getty Images)
Win McNamee/Getty Images
WASHINGTON, DC - MARCH 21: Homeland Security Secretary Kirstjen Nielsen testifies before the Senate Intelligence Committee March 21, 2018 in Washington, DC. The committee heard testimony on the topic of election security during the hearing. (Photo by Win McNamee/Getty Images)
Now playing
01:53
Homeland Security Secretary Kirstjen Nielsen resigns
U.S. President Joe Biden speaks from the Treaty Room in the White House about the withdrawal of U.S. troops from Afghanistan on April 14, 2021 in Washington, DC. President Biden announced his plans to pull all remaining U.S. troops out of Afghanistan by September 11, 2021 in a final step towards ending America's longest war.
Andrew Harnik/Pool/Getty Images
U.S. President Joe Biden speaks from the Treaty Room in the White House about the withdrawal of U.S. troops from Afghanistan on April 14, 2021 in Washington, DC. President Biden announced his plans to pull all remaining U.S. troops out of Afghanistan by September 11, 2021 in a final step towards ending America's longest war.
Now playing
01:03
Biden: It's time to end the forever war
Biden cemetery
CNN
Biden cemetery
Now playing
01:32
Biden says it was 'clear' decision to withdraw as he visits graves of soldiers
One shot doses of the Johnson & Johnson COVID-19 vaccine are prepared at a clinic targeting immigrant community members on March 25, 2021 in Los Angeles, California.  The clinic, run by the St. John's Well Child and Family Center, estimates it has vaccinated more than 100,000 people in the Los Angeles area amid reports of two undocumented women who were refused coronavirus vaccinations in Orange County Rite Aid stores. Rite Aid has called the refusals mistakes in a written statement.  (Photo by Mario Tama/Getty Images)
Mario Tama/Getty Images
One shot doses of the Johnson & Johnson COVID-19 vaccine are prepared at a clinic targeting immigrant community members on March 25, 2021 in Los Angeles, California. The clinic, run by the St. John's Well Child and Family Center, estimates it has vaccinated more than 100,000 people in the Los Angeles area amid reports of two undocumented women who were refused coronavirus vaccinations in Orange County Rite Aid stores. Rite Aid has called the refusals mistakes in a written statement. (Photo by Mario Tama/Getty Images)
Now playing
02:48
These unlikely events are still more likely than a blood clot after the J&J vaccine
U.S. Marines conduct an operation to clear a village of Taliban fighters in July 2009 in Mian Poshteh, Afghanistan.
Joe Raedle/Getty Images
U.S. Marines conduct an operation to clear a village of Taliban fighters in July 2009 in Mian Poshteh, Afghanistan.
Now playing
03:19
Biden to announce Afghanistan withdrawal by September 11
roger wicker
CNN
roger wicker
Now playing
04:52
Sen. Wicker on Biden's infrastructure plan: Not ruling out tax hike
Representative Matt Gaetz (R-FL) arrives for a House Armed Services Subcommittee hearing with members of the Fort Hood Independent Review Committee on Capitol Hill on December 9, 2020 in Washington, DC.
Samuel Corum/Getty Images
Representative Matt Gaetz (R-FL) arrives for a House Armed Services Subcommittee hearing with members of the Fort Hood Independent Review Committee on Capitol Hill on December 9, 2020 in Washington, DC.
Now playing
03:02
Sources say Gaetz was denied meeting with Trump
CNN
Now playing
07:27
CNN anchor pushes back on Texas state lawmaker's defense of voting bill
CNN
Now playing
01:12
Tapper asks Buttigieg for infrastructure plan timeline
Now playing
02:48
GOP governor calls Trump's RNC remarks 'divisive'
WASHINGTON, D.C. - APRIL 19, 2018:  The U.S. Supreme Court Building in Washington, D.C., is the seat of the Supreme Court of the United States and the Judicial Branch of government. (Photo by Robert Alexander/Getty Images)
Robert Alexander/Getty Images
WASHINGTON, D.C. - APRIL 19, 2018: The U.S. Supreme Court Building in Washington, D.C., is the seat of the Supreme Court of the United States and the Judicial Branch of government. (Photo by Robert Alexander/Getty Images)
Now playing
02:39
SCOTUS blocks California Covid restriction on religious activities
rep jim clyburn georgia voting law jim crow sot sotu vpx_00000000.png
rep jim clyburn georgia voting law jim crow sot sotu vpx_00000000.png
Now playing
02:13
Rep. Clyburn blasts GA voting law: It's the 'new Jim Crow'
Gaetz speaks to members of the media outside the hearing Michael Cohen, former attorney and fixer for President Donald Trump, testifies at before the House Committee on Oversight and Reform at Rayburn House Office Building February 27, 2019 on Capitol Hill in Washington, DC. Last year Cohen was sentenced to three years in prison and ordered to pay a $50,000 fine for tax evasion, making false statements to a financial institution, unlawful excessive campaign contributions and lying to Congress as part of special counsel Robert Mueller's investigation into Russian meddling in the 2016 presidential elections.
Alex Wong/Getty Images
Gaetz speaks to members of the media outside the hearing Michael Cohen, former attorney and fixer for President Donald Trump, testifies at before the House Committee on Oversight and Reform at Rayburn House Office Building February 27, 2019 on Capitol Hill in Washington, DC. Last year Cohen was sentenced to three years in prison and ordered to pay a $50,000 fine for tax evasion, making false statements to a financial institution, unlawful excessive campaign contributions and lying to Congress as part of special counsel Robert Mueller's investigation into Russian meddling in the 2016 presidential elections.
Now playing
06:11
'Bombastic, antagonistic, unapologetic': A look at Gaetz's political career
Former House Speaker John Boehner attends a ceremony to unveil a portrait of himself on Capitol Hill, Tuesday, Nov. 19, 2019 in Washington.
Michael A. McCoy/AP
Former House Speaker John Boehner attends a ceremony to unveil a portrait of himself on Capitol Hill, Tuesday, Nov. 19, 2019 in Washington.
Now playing
02:42
Boehner says Republican colleague held 10-inch knife to his throat outside House floor
President Joe Biden, accompanied by Vice President Kamala Harris, and Attorney General Merrick Garland, speaks about gun violence prevention in the Rose Garden at the White House, Thursday, April 8, 2021, in Washington.
Andrew Harnik/AP
President Joe Biden, accompanied by Vice President Kamala Harris, and Attorney General Merrick Garland, speaks about gun violence prevention in the Rose Garden at the White House, Thursday, April 8, 2021, in Washington.
Now playing
02:05
Biden calls for ban on assault weapons
CNN
Now playing
02:22
Biden: High-speed internet is infrastructure
(CNN) —  

Kirstjen Nielsen, the secretary of Homeland Security who has become a face of President Donald Trump’s hardline immigration push, is leaving the administration, President Donald Trump announced on Twitter Sunday afternoon.

“Secretary of Homeland Security Kirstjen Nielsen will be leaving her position, and I would like to thank her for her service,” Trump said on Twitter.

“I am pleased to announce that Kevin McAleenan, the current U.S. Customs and Border Protection Commissioner, will become Acting Secretary for @DHSgov. I have confidence that Kevin will do a great job!” Trump continued.

Nielsen did not resign willingly, a person close to her told CNN, but was under pressure to do so. Nielsen did not fight nor grovel to keep her job, the source said. Nielsen should be staying for a week of transition, another White House official said.

McAleenan is a holdover from the Obama administration. He was sworn in on March 20, 2018, as commissioner of US Customs and Border Protection. He is expected to serve as the acting secretary “in the short term,” meaning he is not expected to be in the position for the long term, according to a White House official.

Senior administration officials told CNN that Nielsen had a 5 p.m., meeting at the White House with Trump where she was planning to discuss with him the immigration and border issues and a path forward. She had no intention of resigning, according to one of the sources, but rather was going there with an agenda.

Trump had grown increasingly frustrated with the situation at the border, which has seen an influx in migrants, predominantly from Northern Triangle countries.

In California on Friday, a senior administration official tells CNN, Trump told border agents he wanted them to stop letting people cross the border, despite the fact that Central American asylum seekers according to US law can do so.

Nielsen “believed the situation was becoming untenable with the President becoming increasingly unhinged about the border crisis and making unreasonable and even impossible requests,” a senior administration official tells CNN.

“I hereby resign from the position of Secretary of the U.S. Department of Homeland Security (DHS), effective April 7th 2019,” Nielsen wrote in her resignation letter. “Despite our progress in reforming homeland security for a new age, I have determined that it is the right time for me to step aside.”

Nielsen later tweeted that she “agreed to stay on as Secretary through Wednesday, April 10th to assist with an orderly transition and ensure that key DHS missions are not impacted.”

Removing Nielsen and installing McAleenan as acting secretary presents issues for the line of succession. Putting McAleenan in charge skips over acting Deputy Secretary Claire Grady, who also serves in the Senate confirmed role as the Undersecretary of Management, which raises questions about her future. A senior administration official told CNN that legally Grady is next in line and will have to go in order for McAleenan to assume the role of acting secretary. Another official, asked about this question, told CNN there are issues that need to be addressed before McAleenan can take over.

In a series of tweets, Nielsen said, “it has been an honor of a lifetime to serve with the brave men and women” of DHS and repeated what she also said in her resignation letter that she “could not be prouder of and more humbled by their service.”

Nielsen has felt “in limbo” for the last week, a person close to her says, as she bore the brunt of the President’s anger over the border.

She’s been increasingly on thin ice in the eyes of the President. She did not realize how dire it was when she left the US last weekend, but quickly did, as she abruptly returned.

She did interviews – including on CNN – to try and improve the President’s souring view of her, the source close to Nielsen said, but to little avail.

“Nothing she could do or say could change how the President started viewing her,” the source close to Nielsen said.

That said, she was prepared to be fired at any moment, but did not know going into Sunday’s meeting it would be imminent.

Democrats immediately reacted to the news.

“Hampered by misstep after misstep, Kirstjen Nielsen’s tenure at the Department of Homeland Security was a disaster from the start. It is clearer now than ever that the Trump Administration’s border security and immigration policies - that she enacted and helped craft - have been an abysmal failure and have helped create the humanitarian crisis at the border,” said House Homeland Security Committee Chairman Bennie Thompson in a statement.

Rep. Mike Rogers of Alabama, the top Republican on the House Homeland Security Committee, acknowledged Nielsen’s challenges in a statement and expressed confidence in McAleenan and whomever the President nominated later.

“Secretary Nielsen served her country honorably as Homeland Security Secretary, despite facing numerous challenges including dire conditions at our southwest border,” Rogers said. “Although Commissioner McAleenan will have his work cut out for him, I am confident the department is in capable hands. I look forward to working with McAleenan in his new role and to learning who the president intends to nominate on a permanent basis.”

Tumultuous tenure

The departure comes just days after Trump suddenly withdrew the nomination of Ron Vitiello for Immigration and Customs Enforcement director, blindsiding the Department of Homeland Security and the Hill. Nielsen was unaware what was happening until after the nomination had been pulled, a person familiar with the news said. The announcement Sunday also follows plans to cut aid to some Central American countries, marking a sudden reversal after Nielsen had days earlier visited Honduras to sign a regional compact agreement with Honduras, El Salvador and Guatemala.

Nielsen has had a tumultuous tenure that saw Trump steadily ramping up pressure on his team to execute his immigration promises, which he believes is the single driving issue for his base of political supporters.

Trump has vented privately that Nielsen hasn’t adequately secured the border or enacted stricter immigration rules, even as she became the face of policies that administration critics called heartless and illegal.

In recent weeks, administration officials have been sounding the alarm over the increase in migrants at the southern border, underscoring the change in demographics as one of the reasons for the host of challenges they’re facing. McAleenan said late last month that the US was on pace to encounter more than 100,000 migrants in March alone, making it “the highest month since 2008.”

“Right now, we have an emergency on our hands. We need to treat it as such,” Nielsen told Chris Cuomo on CNN’s “Cuomo Prime Time” Thursday. Nielsen, who served in President George W. Bush’s administration, never overcame internal skepticism about her allegiance to Trump. She joined the administration as chief of staff to John Kelly, who was Trump’s first Homeland Security secretary.

When Kelly moved to the West Wing as chief of staff, Nielsen followed, becoming a deputy chief of staff tasked with helping Kelly bring rigor to a freewheeling staff.

The role didn’t gain her popularity, but it helped her gain enough of Trump’s trust to elevate her to the Cabinet post.

But at the agency that oversees border protection and immigration matters – Trump’s signature issue – it was inevitable Nielsen would find herself in the President’s crosshairs.

After a previous Cabinet meeting during which Trump berated her for not acting strongly enough on preventing illegal immigration, Nielsen considered resigning, people familiar with the matter said at the time.

She didn’t then and went on to become one of the public faces of a controversial policy that separated families at the southern border.

House Speaker Nancy Pelosi released a statement on Nielsen’s resignation, saying, “It is deeply alarming that the Trump Administration official who put children in cages is reportedly resigning because she is not extreme enough for the White House’s liking.”

Pelosi went on to say, “The President’s dangerous and cruel anti-immigrant policies have only worsened the humanitarian suffering at the border and inflicted vast suffering on the families who have been torn apart.”

The President posted on Twitter shortly after announcing Nielsen’s departure that the “Country is FULL!” and wrote there have been more apprehensions at the southern border “than in many years.” He called on Congress to “fix loopholes” and reiterated his threat to close the border.

This story has been updated with additional developments Monday.

CNN’s Jeff Zeleny, Kevin Liptak, Evan Perez, Tammy Kupperman, Geneva Sands, Phil Mattingly and Kate Sullivan contributed to this report.