WASHINGTON, April 7 (CGTN) -- 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.

Nielsen, 46, held the position since December 2017. As it includes immigration and customs enforcement, her department is responsible for carrying out some of Trump's most contentious policies as he has sought to cut back on the number of Mexicans and Central Americans entering the U.S. without proper documentation.

Repeatedly subjected to tough questioning by Democrats in Congress, Nielsen has overseen Trump plans such as his effort to build a wall on the border with Mexico and the separation of migrant children from their families.

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 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 U.S. without proper documentation.

He insists that the arrival of immigrants across the southern U.S. border constitutes a national emergency. He recently threatened to close the border, or parts of it, if Congress did not change U.S. laws to fix what he called immigration "loopholes."

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.