Several White House aides and external advisers who have supported the president’s hawkish immigration agenda attended the Monday meeting, which devolved into a melee pitting two of Trump’s embattled aides, White House chief of staff John Kelly and Department of Homeland Security Kirstjen Nielsen, against other attendees, according to three people briefed on the exchange.

Kelly and Nielsen argued against signing the declaration, which granted the military broad authority at the border, telling the president that the move was beyond his constitutional powers. They were vocally opposed by, among others, senior policy adviser Stephen Miller; Chris Crane, president of the National Immigration and Customs Enforcement Council; and Brandon Judd, president of the border patrol union. Also present was Vice President Mike Pence, who did not take a stand on the issue, according to one of the people briefed on the debate.

Kelly and Nielsen eventually came around to the president’s position, and the bitter dispute ended Tuesday evening when Kelly, on Trump’s orders, signed a Cabinet declaration granting the military the disputed authority. The move ran afoul of the guidance offered by the White House counsel, Emmet Flood, who cautioned that it was likely to run into constitutional roadblocks, according to a second source familiar with the conversations.