After months of reported clashes with Department of Homeland Security Secretary Kirstjen Nielsen over immigration and U.S. border security policies, President Donald Trump announced on Sunday that she would be leaving the White House, with U.S. Customs and Border Protection Commissioner Kevin McAleenan set to replace her as acting secretary.

In the hours since Trump’s announcement, more information has come to light on just how tenuous the relationship between the U.S. leader and Nielsen had become in her final months heading the Department of Homeland Security.

In a report following on the heels of Nielsen’s resignation, The New York Times detailed how Trump would call Nielsen at home early in the morning to demand that she “take action to stop migrants from entering the country.”

The news outlet reported that the president would even go so far as to pressure Nielsen to take measures that were illegal to stop asylum seekers from coming to the U.S. border, including “blocking all migrants from seeking asylum.”

“She repeatedly noted the limitations imposed on her department by federal laws, court settlements and international obligations,” the newspaper reported.

Rather than placating the president, however, Nielsen’s attempts at explaining why she could not simply shut down the asylum process would only further stoke the flames of the U.S. leader’s fury, The Times reported.

According to The Times, tensions between the DHS chief and the president came to a head in the spring of 2018 after Nielsen hesitated to sign a memo enforcing Trump’s “zero tolerance” policy, which would result in 2,500 children being separated from their parents at the U.S.-Mexico border.

The president reportedly berated Nielsen repeatedly in front of her peers during a Cabinet meeting, leading her to draft a resignation letter. Before submitting it, Nielsen reconsidered and decided to stay.

That decision would stick only until the following spring, with Trump announcing Nielsen’s resignation on Sunday in a tweet after months of speculation over how long Nielsen would last on the job.

“Secretary of Homeland Security Kirstjen Nielsen will be leaving her position, and I would like to thank her for her service,” the president said. He then announced that McAleenan would be filling in as acting DHS secretary, adding that he had “great confidence that Kevin will do a great job.”

The exact terms of Nielsen’s resignation are still unclear. But according to The Times, Nielsen had requested a meeting with Trump to plan “a way forward” for dealing with the situation at the southern border. While Nielsen came prepared with a list of ways to improve her relationship with the president, according to The Times, Trump was “determined to ask for her resignation.” And after that meeting, she submitted it, The Times reported, citing three people familiar with the meeting.

In her resignation letter, Nielsen wrote of how “for more than two years of service beginning during the Presidential Transition,” she had “worked tirelessly to advance the goals and missions of the Department.

“I can say with confidence our homeland is safer today than when I joined the Administration. We have taken unprecedented action to protect Americans. We have implemented historic efforts to defend our borders, combat illegal immigration, obstruct the inflow of drugs and uphold our laws and values,” Nielsen wrote in her letter.

“Thank you again for the privilege to serve the American people and to lead the outstanding men and women of the Department of Homeland Security,” Nielsen wrote. “Supporting these patriots has been the honor of a lifetime.”