Homeland Security Secretary Kirstjen Nielsen is resigning, capping 16 turbulent months as the top U.S. official dealing with what President Trump has dubbed a border "crisis."

Trump confirmed the resignation after he met Nielsen at the White House Sunday evening.

"Secretary of Homeland Security Kirstjen Nielsen will be leaving her position, and I would like to thank her for her service," he tweeted. "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!"

....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! — Donald J. Trump (@realDonaldTrump) April 7, 2019

In her resignation letter, Nielsen said she "determined that it is the right time for me to step aside."

She added: “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.”

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

Later in the evening, Nielsen said she would stay on until Wednesday to help with the transition process.

I have 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. — Sec. Kirstjen Nielsen (@SecNielsen) April 8, 2019

The stunning development comes at a time when Trump has grown increasingly frustrated with a spike in migrant families heading to the U.S.-Mexico border and has delivered erratic declarations about his plans to stem that tide. The Trump administration has warned that many of those seeking asylum make fraudulent claims and abuse the system. Trump recently threatened to close the U.S.-Mexico border if Democrats do not agree to immigration reforms.

The announcement of Nielsen's departure also follows top officials at the Department of Homeland Security, including Nielsen, being caught off guard by the White House’s sudden move Thursday night to pull the nomination of Ronald Vitiello to lead Immigration and Customs Enforcement.

She accompanied Trump when he visited a new section of the border wall with Mexico in Calexico, Calif., on Friday.

In a scathing statement, House Homeland Security Committee Chairman Bennie Thompson, D-Miss., reacted to Nielsen's departure.

“Hampered by misstep after misstep, Kirstjen Nielsen's tenure at the Department of Homeland Security was a disaster from the start," Thompson said. "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."

In a brief reaction of his own, Senate Minority Leader Chuck Schumer, D-N.Y., said, "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.”

By contrast, GOP leaders in Congress praised Nielsen as "strong" and "principled."

Nielsen has overseen DHS for roughly 16 months, leading the Trump administration's immigration efforts and push to build a barrier along the U.S.-Mexico barrier.

Nielsen has been on the outs with Trump in the past. In November, the Washington Post reported Trump informed advisers that he was ready to oust Nielsen within days, despite opposition from then-White House chief of staff John Kelly, due to frustration with her performance.

Democrats have previously called for Nielsen to resign for a hard-line immigration policy that resulted in migrant family separations.

When it was reported in November that Nielsen would soon to be terminated as DHS secretary, sources told the Washington Examiner that David Pekoske, the administrator of the Transportation Security Administration, and Kevin McAleenan were most likely to be chosen to succeed her. Although McAleenan, a 47-year-old CBP chief, has less experience than Pekoske, he was described as level-headed and capable of jumping from his mostly immigration-related job to overseeing 240,000 employees in the department.

Nielsen, 46, joined the Trump administration in January 2017 as chief of staff for then-DHS Secretary John Kelly. Nielsen guided Kelly through his Senate confirmation process, during which the two developed a close working relationship.

In July of 2017, Trump picked Kelly for White House chief of staff, and Nielsen worked as his principal deputy chief of staff. Trump nominated Nielsen to lead DHS in October and she was confirmed in a 62-37 vote.

Nielsen used her time at DHS to push Congress for more border wall funding and to tighten the "loopholes" in immigration laws that she blamed many times as incentives for illegal immigration.

Nielsen was the first DHS employee to be promoted to top departmental official in its 16-year history. She previously worked in the Transportation Security Administration and served on the White House Homeland Security Council under former President George W. Bush.

With Nielsen out, Trump now has top agency officials in an acting capacity at DHS, the Defense Department, and Interior Department. Next week, Linda McMahon is set to resign as administrator of the Small Business Administration.