Days before a U.S. military operation removed Venezuela’s President Nicolás Maduro, lawyers in the Justice Department’s Office of Legal Counsel issued a heavily redacted opinion arguing that the executive branch could proceed without the action meeting the constitutional definition of a war. The opinion, dated Dec. 23 and prepared for the legal adviser for the White House National Security Council, shed new detail on how the administration concluded it was legally permitted to oust Maduro as Venezuelan president as part of a planned process that would leave him to face criminal prosecution in the United States.

The AP reported that the question addressed in the memo was whether President Donald Trump could order the military to aid law enforcement in removing Maduro from power, so that Maduro could be prosecuted in the U.S. The opinion said the answer was yes, and it framed the decision around a set of reasons laid out in the document, including what it described as “severe” allegations against Maduro contained in a drug-trafficking conspiracy indictment, as well as other “highly dangerous activities” the opinion said were attributed to Maduro and associates.

The legal reasoning also addressed security considerations connected to the operation itself, including the possibility that military force might be needed to protect civilians in Venezuela and abroad and the expectation that U.S. personnel could encounter “armed resistance” protecting Maduro. In one passage, the opinion described a scenario presented to the legal team, stating: “Here, we were told to assume that there were as many as 200 armed guards in a literal fort who have been sent from and armed by another country purely to ensure Maduro’s safety.”

According to the AP, the opinion treated that expected armed resistance as support for providing “military forces to provide security for law enforcement personnel carrying out the rendition.” The memo also said it identified significant risks, which it tied in part to where Maduro would be located at the time of the action, but it nonetheless concluded that the likelihood of the operation escalating into an all-out war that would require congressional approval was low.

The AP said Republican leaders had also faced scrutiny after they indicated they had not been given advance notification of the raid, and that Senate Republicans had voted to dismiss a resolution that would have limited the president’s ability to conduct further attacks against Venezuela. In the same legal opinion, the lawyers addressed the possibility of broader consequences by saying they were “assured that there is no contingency plan to engage in any substantial and sustained operation that would amount to a constitutional war,” while also stating: “We were further assured that there is no contingency plan that would involve using U.S. forces occupying Venezuela should the removal of Maduro result in civil unrest in that country.”

The opinion added that, based on those assurances, it did not plan any action that would “amount to a constitutional war.” It also cautioned that the fact a president can lawfully authorize an operation does not automatically mean every use of force carried out during the operation is lawful, and it said the personnel involved “must implement his lawful order in a reasonable way.”