The immigration executive order, issued last week, has created the perfect conditions for a blow-up. The order sowed chaos around the country over the weekend, as the federal government struggled to implement a directive that had not been run past relevant agencies and offered a range of areas for disagreement. Trump signed the order on Friday at a ceremony for Mattis’s installation at the Pentagon, and the retired Marine general looked on as Trump put pen to paper. It’s Kelly at DHS who is charged with implementing much of the order. But it appears that neither man was fully briefed on the order ahead of time, nor did they have any input in the drafting, which was run out of the West Wing.

Kelly is frustrated about how the order was issued, The Wall Street Journal reports, saying that the secretary, a former Marine general, had been pressing the White House for language on the order for days, but only learned of the specifics while traveling to Washington on Friday. The New York Times reports that Kelly was finally getting a briefing as he traveled: “Halfway into the briefing, someone on the call looked up at a television in his office. ‘The president is signing the executive order that we’re discussing,’ the official said, stunned.”

Kelly was not the only person left out of the loop, the Associated Press reports:

At least three top national security officials—Defense Secretary Jim Mattis, Homeland Security Secretary John Kelly and Rex Tillerson, who is awaiting confirmation to lead the State Department—have told associates they were not aware of details of the directive until around the time Trump signed it. Leading intelligence officials were also left largely in the dark, according to U.S. officials.

According to the AP, neither Mattis nor General Joseph Dunford, the chairman of the Joint Chiefs of Staff knew about the details. Tillerson, who if confirmed will become the nation’s top foreign-affairs official “has told the president's political advisers that he was baffled” that he was shut out, the AP said. Mattis was previously critical of the idea of a Muslim ban.

Trump defended the tight control of information in a tweet Monday:

If the ban were announced with a one week notice, the "bad" would rush into our country during that week. A lot of bad "dudes" out there! — Donald J. Trump (@realDonaldTrump) January 30, 2017

One is left to wonder whether the president believes that his Cabinet secretaries are among the “bad ‘dudes.’” Yet the pace of leaks does suggest that if Trump had informed departments of the order ahead of time, the language would have made it to the public, and perhaps forced the White House to delay or soften the order.

The immigration order is only the latest matter to cause friction between Trump and the ex-brass, much of it following the same template—frustration over lack of communication and a sense that the White House demands its way over the objections of department staffers.