WASHINGTON (Reuters) - U.S. Homeland Security Secretary Kirstjen Nielsen, who oversaw President Donald Trump’s bitterly contested immigration policies during her tumultuous 16-month tenure, resigned on Sunday amid a surge in the number of migrants at the border with Mexico.

A senior administration official said Trump asked for Nielsen’s resignation and she gave it.

Trump, who has recently expressed growing anger about the situation at the border, said on Twitter: “Secretary of Homeland Security Kirstjen Nielsen will be leaving her position, and I would like to thank her for her service.”

In another tweet, Trump said Kevin McAleenan, the current U.S. Customs and Border Protection commissioner, would become acting DHS secretary.

In a tweet late Sunday, Nielsen said that she would stay on until Wednesday.

“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,” she said.

Nielsen’s departure was first reported by CBS News.

Nielsen, 46, had been DHS secretary since December 2017. Her departure had been repeatedly rumored over the past year, particularly after a wave of anger over the administration’s 2018 family separation policy at the border with Mexico and most recently as U.S. border officials estimated that 100,000 migrants were apprehended at the southern border in March, the highest level in a decade.

Another senior administration official said Trump’s national security adviser, John Bolton, after a blowup with Nielsen late last year, also recommended to Trump that she should go.

Slideshow ( 11 images )

Trump has made a clampdown on illegal immigration a centerpiece of his two-year-old presidency, leading chants of “Build that wall” at his rallies as he has sought to cut back on the number of newcomers entering the United States without proper documentation.

Many of the migrants picked up last month were Central Americans seeking U.S. asylum.

Trump was so frustrated about the increase that he announced he would cut off U.S. aid to Guatemala, Honduras and El Salvador. He also threatened to close the border with Mexico, although he later backed off that proposal with a threat to impose tariffs on auto imports.

In her resignation letter, Nielsen asked for more from Congress and the courts, which have opposed such Trump administration initiatives as his effort to limit immigration from Muslim nations and the border wall.

“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,” she wrote to Trump.

Trump also took aim at Congress in another tweet later on Sunday, saying: “Country is FULL,” and saying Democrats in Congress must “fix loopholes” and repeating his threats to close the border or impose tariffs if Mexico does not do more.

Nielsen’s resignation was the latest high-profile departure from the Trump administration, and leaves just four women in his Cabinet. Among others, Trump currently lacks a permanent secretary of defense or chief of staff.

Slideshow ( 11 images )

LIGHTNING ROD

Nielsen’s departure was announced two days after the Republican president abruptly said on Friday he was dumping his nominee to be the top official at U.S. Immigration and Customs Enforcement (ICE), Ronald Vitiello, saying he wanted someone “tougher.”

ICE is under the jurisdiction of DHS, which was formed following the Sept. 11, 2001, attacks on New York and Washington.

Repeatedly subjected to tough questioning by Democrats at congressional hearings, Nielsen became a lightning rod for criticism of Trump’s policies. She was confronted by protesters last year at a Mexican restaurant in Washington.

Last year, Nielsen came under increasing pressure by critics to step aside after the Trump administration adopted the policy of separating migrant children from their parents as part of its “zero tolerance” approach intended to deter families from leaving home in the hope of entering the United States.

After criticism as pictures of children in cages were spread across the world, Trump signed an executive order in June ending family separations and requiring that families be held together in federal custody while the adults awaited prosecution for illegally crossing the border.

But the government reported that at least 245 children were taken from their families between that time and the first months of 2019.

Trump insists that the arrival of immigrants across the southern U.S. border constitutes a national emergency so important that he sidestepped Congress’ refusal to provide him with billions of dollars he requested to build the border wall.

Representative Bennie Thompson, the Democratic chairman of the House of Representatives Homeland Security Committee, said Nielsen’s tenure at DHS “was a disaster from the start.”

He said in a statement, however, that she should not serve as a scapegoat, blasting Trump for “terrible and cruel policies.” Noting that the department now has neither a permanent secretary nor deputy secretary, Thompson called on the administration to work with Congress “in good faith.”

Before she was nominated as secretary, Nielsen worked as a deputy to former Marine General John Kelly, who headed DHS before becoming White House chief of staff.

Kelly resigned as chief of staff on Jan. 2 amid reports of a strained relationship with Trump.