By Cordelia Lynch, US correspondent
Kirstjen Nielsen's days as Homeland Security Secretary had long seemed numbered.
Many expected she would be pushed out last November, but her exit never materialised.
During her tenure, which came to an end today, she defended the Trump's administration's zero tolerance policy that resulted in thousands of migrant children being separated from their families.
There are reports that President Trump had been pushing for months to reinstate that policy, but that Ms Nielsen opposed it on legal rather than moral grounds. It is claimed she told the president what he was trying to do would be prohibited by a court order.
If that is the case, will her replacement, Kevin McAlleen, be more willing to push the bounds of what is legal?
Ms Nielsen and Donald Trump's relationship was viewed as fractured from the start. But recently, things seem to have deteriorated further.
There was a spate of stories in Washington suggesting that Mr Trump blamed her for failing to resolve what he describes as a "crisis" on the border and for a recent spike in families crossing.
More from United States
The 46-year-old was often criticised by Democratic lawmakers and some in the media for defending the separation policy.
It may be that Ms Nielsen was in fact the one to officially resign, but many White House watchers believe the president had wanted her gone for months.
She was believed to be resistant to immigration measures supported by the president and his aides, particularly senior adviser Stephen Miller, both on the border and on issues like protected status for refugees.
In recent weeks, tensions appear to have reached a head as Mr Trump seeks to regain control of the issue ahead of the 2020 re-election campaign.
The president viewRead More – Source