Homeland Security Secretary Kirstjen Nielsen resigned on Sunday, giving President Donald Trump the chance to further reset his policies on illegal immigration, as he demands that Mexico do more to stop the flow of illegal immigrants and drugs, and that Congress approve legislation to make major changes in U.S. immigration laws.

"I hereby resign from the position of Secretary of the U.S. Department of Homeland Security (DHS), effective April 7th 2019," Secretary Kirstjen Nielsen wrote in a letter released on Sunday evening.

"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 added in her letter.

A few hours later, Nielsen amended her resignation letter - as she will stay on until Wednesday.

Soon after Nielsen's announcement, President Trump said he was moving the current head of Customs and Border Patrol, Kevin McAleenan, into the DHS job on an Acting basis.

From the outset, Nielsen seemed to be on the outs with President Trump, who has been looking for a tougher public front on the border.

Last Friday, Mr. Trump suddenly scrapped his nominee to head immigration services in the federal government, as the President said he wanted to go in a 'different direction.'

Democrats denounced Nielsen, having long accused her of lying to Congress about the actions of the Homeland Security Department in dealing with the separation of illegal immigrant families.

“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,” said House Speaker Nancy Pelosi.

“Nielsen ripped families apart and put children in cages,” said Rep. Sylvia Garcia (D-TX).  “God help us with what may come next."

“Secretary Nielsen took babies out of the hands of their mothers and put them into cages," said Rep. Ben Ray Lujan (D-NM). "Good riddance."

"Kirstjen Nielsen may not have been the architect of Donald Trump’s inhumane immigration agenda, but she was its steward and her departure is long overdue," said Sen. Ed Markey (D-MA), as Democrats savaged the immigration policies of the Trump Administration.

The move will give the President the chance to nominate someone new - but it will also require Senate confirmation hearings on that nominee, which are certain to become center stage for a public battle over the President's border and immigration goals.