President Trump returns the salute of a Marine honor guard as he disembarks from Marine One upon arrival at the White House. (Manuel Balce Ceneta/Associated Press)

While much of the rest of the country was settling in for the Super Bowl on Sunday night, a group of senior Obama administration officials was putting the finishing touches on an unprecedented legal brief charging President Trump with endangering national security.

Signed by former president Barack Obama’s national security adviser, his top counterterrorism aide and his secretary of state, as well as other senior security officials from the past three administrations, the brief was filed in support of Friday’s federal court ruling that froze Trump’s executive order on immigration.

The filing called the order “ill-conceived, poorly implemented and ill-explained,” and said there was “little evidence” it had been analyzed by policy professionals before Trump signed it.

On Monday, Trump called reports of wide public disapproval of the order “lies” and “fake news.” While the brief contended that the order was signed without input from intelligence, law enforcement and diplomats, Trump tweeted that he acted “largely based on an accumulation of data.”

Signatories to the brief are part of a nascent movement seeking to match ongoing public protests with the efforts of former government insiders who are willing to formally challenge Trump administration words and actions.

Most of the participants are former Obama officials, but they include some diplomatic, military, White House and Cabinet-level officials from the administrations of George W. Bush and Bill Clinton. Obama himself offered his support for protest, in a statement three days after Trump’s Jan. 27 order, that called on “all citizens . . . to be guardians of our democracy” and “have their voices heard.”

On the same day, more than 100 former diplomats, government and military officials signed a letter urging top officials at the departments of State, Homeland Security and Justice to use their “discretion” in implementing the directive to “mitigate” its effects.

Using technology that was far less prevalent when Obama took office in 2009, some former officials have taken to Twitter, Trump’s favored means of mass communication, to counter the new administration.

“I’m not aware of any U.S. President ever discussing campaigns and voting data when talking to Americans in uniform,” Benjamin Rhodes, an Obama deputy national security adviser, tweeted minutes after Trump began his Monday remarks to the U.S. Central Command in Tampa by thanking military members for voting for him. “I saw those numbers, and you liked me, and I liked you,” Trump said.

Colin Kahl, former vice president Joe Biden’s national security adviser, tweeted last week to deny that a chaotic raid by U.S. Special Operations forces in Yemen, which left one service member and a number of civilians dead, had been initially approved by Obama.

“Trump and his team owns the process and the ultimate decision — and the consequences,” Kahl said.

Seeking to build on the model of the now-defunct National Security Network, a group of progressive Democrats espousing “pragmatic and principled” national security policies that was formed after John F. Kerry’s loss in the 2004 election, Obama officials led by former acting secretary of homeland security Rand Beers, former Defense Department official Vikram Singh and Jake Sullivan, a senior White House and State Department adviser who joined Hillary Clinton’s campaign, have been gathering adherents and seeking funding.

With guidance from that group, the immigration brief was written by Harold Hongju Koh, a Yale Law School professor and former dean who served as a State Department legal adviser during Obama’s first term.

Working with students and professors at Yale’s Rule of Law Clinic, Koh drafted the statement Saturday, the morning after a judge with the U.S. Court of Appeals for the 9th Circuit in Washington state ordered a stay on all action under Trump’s order. The administration has appealed the ruling.

Signers exchanged drafts and added points until shortly before the brief was filed late Sunday night. “My purpose [in signing] was pretty narrow,” Michael V. Hayden, who served as Bush’s National Security Agency head and CIA director, said in an email.

“From my point of view and experience, the intelligence did not warrant such a dramatic step” as Trump’s executive order, Hayden said. “Bottom line: didn’t solve a real problem and actually made the overall situation worse.”

Four of the 10 signers — Kerry, who served as Obama’s secretary of state; national security adviser Susan E. Rice and her deputy, Avril Haines; and chief counterterrorism adviser Lisa Monaco — “were current on active intelligence regarding all credible terrorist threat streams directed against the U.S. as recently as one week before” the order was issued.

“We all agree that the United States faces real threats,” it read, but “we are nevertheless unaware of any specific threat that would justify the travel ban” the order included. “In our professional opinion, this order cannot be justified on national security or foreign policy grounds.”

In addition to disrupting lives, “there is no national security purpose” for an order that, they wrote, “will endanger U.S. troops in the field”; “disrupt key counterterrorism, foreign policy, and national security partnerships that are critical” to counterterrorism operations; “endanger intelligence sources in the field”; “feed recruitment” of the Islamic State and other extremists; and “disrupt ongoing law enforcement efforts.”

Other former officials who signed the brief include defense secretary and CIA director Leon Panetta, secretary of state Madeleine K. Albright, homeland security secretary Janet A. Napolitano and acting CIA directors John McLaughlin and Michael J. Morell.