The US Secretary of Homeland Security Kirstjen Nielsen, who enforced some of President Donald Trump's controversial border policies, has resigned.
Customs and Border Protection Commissioner Kevin McAleenan will replace her temporarily, Mr Trump said.
Ms Nielsen was responsible for the proposed border wall with Mexico and the separation of migrant families.
Her resignation came after the president indicated he wanted to follow a "tougher" immigration policy.
He has often accused Ms Nielsen of not being tough enough.
In recent months, illegal crossings from Central America have surged and Mr Trump has threatened to close the Mexico border.
He has since backtracked and promised to give Mexico a year to stop drugs and migrants crossing into the US.
The New York Times reported that Ms Nielsen went into a meeting with Mr Trump on Sunday to plan "a way forward" with the border situation.
Instead, she was put under pressure to resign from her job, US media say, citing unnamed sources.
She gave no reason for her departure in her resignation letter, although she said this was "the right time for me to step aside" and said the US "is safer today than when I joined the Administration".
Who is Kirstjen Nielsen?
Ms Nielsen first joined Mr Trump's administration in January 2017 as an assistant to the former Homeland Security chief John Kelly.
She became Mr Kelly's deputy when he moved to become White House chief of staff, but returned to lead her former department later that year.
Ms Nielsen defended border policies such as holding children in wire enclosures in the face of strong condemnation and intense questioning by Democrats in Congress.
But she brushed off the demonstration, tweeting that she would "work tirelessly" to fix the "broken immigration system".
Her relationship with Mr Trump is said to have been difficult, although in public she has been loyal to the administration.
A sign of tougher border policy?
By Anthony Zurcher, BBC senior North America reporter
Kirstjen Nielsen reportedly had been on thin ice in the Trump administration for more than a year. Her closest ally, former Chief of Staff John Kelly, exited the White House in December. Now, along the annual spring thaw, the ice beneath her has finally cracked.
Or perhaps the homeland security secretary simply reached her limit. The real story will have to wait for the inevitable leaks and insider accounts that spread every time this president makes a staffing change.
What seems clear, however, is that there are conflicts taking place behind the scenes in the White House – conflicts accompanying the president's increasingly belligerent rhetoric on immigration.
Just two days ago, Mr Trump rescinded his nomination of Ronald Vitiello to head Immigration and Customs Enforcement because, he said, he wanted to go in a "tougher direction".
Now his homeland security secretary – whom he had in the past viewed as not aggressive enough – is out.
Ms Nielsen's name will forever be associated with the Trump administration's family separation border policy that led to massive bipartisan outcry last year. The president eventually backed down from that fight, but these latest moves suggest a more confrontational approach to border security is all but assured.
What's the reaction?
Members of the Democratic party have already commented on her departure.
Bennie Thompson, Mississippi congressman and Chair of the Committee on Homeland Security, said Ms Nielsen's tenure was "a disaster from the start", while Massachusetts Senator Ed Markey calling the move "long overdue".
However, he said the fight is "far from over to ensure Trump's assault on our immigrant community comes to an end".
Kirstjen Nielsen may not have been the architect of Donald Trumps inhumane immigration agenda, but she was its steward and her departure is long overdue. But our fight is far from over to ensure Trumps assault on our immigrant community comes to an end. https://t.co/lHfAFiJJ84