Kirstjen Nielsen, the US homeland security secretary who helped enforce President Trump's zero-tolerance immigration policies, has resigned amid claims of a contentious working relationship with the US leader.

According to The New York Times, Ms Nielson has had a rough ride since she took the job in December 2017 and was "regularly berated" by Trump, who is said to have demanded that she take a more aggressive approach to tighten immigration.

During her tenure, Ms Nielsen became the face of the Trump administration’s hard-line immigration policy, under which anyone who crossed America’s border illegally was referred to the Justice Department for prosecution.

She was notably tasked with defending Trump’s plan to build a wall on the border with Mexico and the separation of migrant children from their families.

In May 2018, it was reported that she drafted her resignation letter after Trump berated her in front of other Cabinet secretaries over the influx of migrant crossings at the border.

'WITCH HUNT!' Trump cashes in on Mueller report with merchandise range Show all 6 1 /6 'WITCH HUNT!' Trump cashes in on Mueller report with merchandise range 'WITCH HUNT!' Trump cashes in on Mueller report with merchandise range The mug 'WITCH HUNT!' Trump cashes in on Mueller report with merchandise range The tee 'WITCH HUNT!' Trump cashes in on Mueller report with merchandise range The tee 'WITCH HUNT!' Trump cashes in on Mueller report with merchandise range The can cooler 'WITCH HUNT!' Trump cashes in on Mueller report with merchandise range The tee 'WITCH HUNT!' Trump cashes in on Mueller report with merchandise range The can cooler

He is said to have criticised her after she hesitated for weeks about whether to sign a memo ordering the routine separation of migrant children from their families so that the parents could be detained.

Despite her loyalty, leaks from the White House in November 2018 suggested she would be out by the end of the year as Trump allegedly complained constantly about her performance.

She was reportedly asked to close all ports of entry and stop allowing individuals requesting asylum into the country, a move she reportedly did not support or consider effective.

A senior administration official told CNN that Ms Nielsen “believed the situation was becoming untenable with the President becoming increasingly unhinged about the border crisis and making unreasonable and even impossible requests.”

In her resignation letter, Ms Nielson placed blame on Congress and courts for the ongoing border crisis, saying limitations were imposed on her department.

“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. “Our country and the men and women of DHS deserve to have all the tools and resources they need to execute the mission entrusted to them.”

Bennie Thompson, the Democratic chairman of the House of Representatives Homeland Security Committee, said Ms Nielsen’s tenure at DHS “was a disaster from the start” but insisted she couldn’t be used as a scapegoat for Trump’s cruel policies.

“It is clearer now than ever that the Trump administration's border security and immigration policies – that she enacted and helped craft – have been an abysmal failure and have helped create the humanitarian crisis at the border,” Mr Thompson said in a statement.

“It is truly unfortunate that Nielsen refused to take responsibility for her actions and was simply unable to lead and stand up to the president for his misguided, wall obsessed anti-immigrant agenda.”

The president publicly thanked Ms Nielsen for her service in a tweet on Sunday night.

“I am pleased to announce that Kevin McAleenan, the current US Customs and Border Protection Commissioner, will become Acting Secretary. I have confidence that Kevin will do a great job!”