President Donald Trump has for months urged his administration to reinstate large-scale separation of migrant families crossing the border, according to three U.S. officials with knowledge of meetings at the White House.

Trump's outgoing Homeland Security secretary, Kirstjen Nielsen, resisted — setting her at odds with the president.

According to two of the sources, Nielsen told Trump that federal court orders prohibited the Department of Homeland Security from reinstating the policy, and that he would be reversing his own executive order from June that ended family separations.

Three U.S. officials said that Kevin McAleenan, the head of Customs and Border Patrol who is expected to take over as acting DHS secretary, has not ruled out family separation as an option.

The policy McAleenan would consider, according to the officials, is known as “binary choice” and would give migrant parents the option between being separated from their children or bringing their children with them into long-term detention.

Trump has been pushing this policy since January, the sources said, when the numbers of undocumented immigrants crossing the border began to rise.

A senior administration official said it seems Trump is convinced that family separation has been the most effective policy at deterring large numbers of asylum-seekers.