Thursday brought President Trump two things he sought: new restrictions on how and when the U.S. government can reveal the names of Americans who come to the attention of intelligence agencies, and a House vote to reauthorize the law that permits those agencies to eavesdrop on foreigners and virtually any American they speak to.

This means, among other things, that the Foreign Intelligence Surveillance Act, or FISA law, will retain a provision that privacy advocates hate. It also means that the intelligence community will find it harder to expose U.S. officials who conduct backroom deals with adversaries because the exposure process will now go through a politically appointed agency head and be saved for five years, possibly allowing political retribution down the line. Had this new “unmasking” policy been in place in December 2016, for example, the Americans probably would not have heard about Michael Flynn's conversations with Russian officials during the transition period. There would be less public pressure to continue the investigation and Flynn would still probably be Trump’s national security adviser instead of a felon.

The day started with a jolt: a 7:30 a.m. Trump tweet that contradicted his administration’s months-long push to reauthorize the law: “House votes on controversial FISA ACT today. “This is the act that may have been used, with the help of the discredited and phony Dossier, to so badly surveil and abuse the Trump Campaign by the previous administration and others?”

“House votes on controversial FISA ACT today.” This is the act that may have been used, with the help of the discredited and phony Dossier, to so badly surveil and abuse the Trump Campaign by the previous administration and others? — Donald J. Trump (@realDonaldTrump) January 11, 2018

The tweet immediately created chaos, with panicked lawmakers phoning the White House to ask: why was Trump complaining about FISA?

The answer concerns Section 702, the law’s provision that allows the government to collect information about the communications of foreigners even when they are talking to Americans — and thus potentially to subject the private discussions of U.S. citizens to government surveillance without a warrant. Privacy and civil liberties groups have called the provision too broad; law enforcement and intelligence officials have called it essential.

What was important at 7:30 a.m. was the president’s personal relationship with the 702 provision.

In December 2016, the U.S. intelligence community used its Section 702 authority to record conversations that Russian Ambassador Sergey Ivanovich Kislyak was having with Flynn, who would soon be named Trump’s first national security adviser. Flynn was not the foreign “person of interest,” so the spy agencies could not immediately disclose that he was talking — possibly illegally — with the Russian.

There are rules about how and when someone in government can request an unmasking — that is, to reveal the name of a person caught up in such “incidental collection,” or simply covered in classified intelligence briefings. It is permitted, for example, when the intelligence suggests that the person was an “agent of a foreign power.” It's also possible when more than one intelligence agency believes the name might be relevant to an investigation (in other words, the person in question keeps showing up in classified intelligence reports on different subjects dealing with foreign agents.)

A handful of people can perform unmasking. At a March 2017 hearing before the House Select Committee on Intelligence, NSA head Admiral Michael Rogers explained that there are about 20 career intelligence professionals at the NSA, with the power to unmask (he could not speak to how many individuals existed at other agencies) He also discussed at length the safeguards in place regarding unmasking and the necessity of letting a handful of career intelligence professionals have unmasking powers, so long as they followed rules and procedures. Bottom line: when more than one intelligence agency thinks that there might be criminal wrongdoing involving a foreign power, career intelligence professionals need to be able to share information about it. But there are still legitimate questions about whether the 702 authority is too broad as it applies to regular Americans caught up in incidental collection.

In Flynn’s case, Bloomberg reported, Obama National Security Adviser Susan Rice made several unmasking requests related to Trump campaign officials during the transition period in their conversations with foreign parties. The exact relationship between the unmasking requests and the FBI investigation into Flynn's involvement with Kremlin operatives is still not clear to the public. But the news that Flynn was under investigation eventually leaked to the Wall Street Journal, in part because his name was no-longer redacted. That drew additional and vital public attention to the possibility that that Trump campaign officials had colluded with Russians.

In response, the Trump administration and their supporters began to push the idea that Flynn's "unmasking,” and the rules surrounding it, are scandalous. It's a line of attack they adopted after failing to prove that the FBI caught Flynn by illegally wiretapping Trump Tower and then, later, after failing to establish that Rice had done anything illegal in her unmasking of him. Various Republicans including Rep. Devin Nunes, R-Calif., who leads the House Permanent Select Committee on Intelligence, have been working to stiffen rules about unmasking. In December, Director of National Intelligence Dan Coates said he was open to such changes. On Tuesday, the President signed a memo ordering Coates to deal with the unmasking issue “within 30 days.”

On Thursday, it seems, the president woke up and -- spurred to it by a Fox & Friends segment-- realized that he was caught in the middle. He and his supporters have condemned the investigation of their alleged collusion with to Russia, which has been furthered by intelligence collected under FISA’s 702 provision and disseminated under the unmasking rules. But his administration has supported the reauthorization of a tool that the law enforcement and intelligence community called vital.

So he tweeted — and White House staff immediately began hearing from concerned and confused lawmakers. House Speaker Rep. Paul Ryan, R-Wisc., got the president on the phone for 30 minutes, the Washington Post reported, and walked him through just what the law meant.

At 9:14 a.m., nearly two hours after his initial tweet, Trump changed his mind on the FISA vote, tweeting that the re-authorization had his blessing and that it was all part of a plan. “I have personally directed the fix to the unmasking process since taking office and today’s vote is about foreign surveillance of foreign bad guys on foreign land. We need it! Get smart!” NPR reports that intelligence heads actually called him personally to help craft it.

With that being said, I have personally directed the fix to the unmasking process since taking office and today’s vote is about foreign surveillance of foreign bad guys on foreign land. We need it! Get smart! — Donald J. Trump (@realDonaldTrump) January 11, 2018

At 11:14 a.m., Coates, announced more details about the update to the unmasking policy. The new procedures require:

Anyone making a request to show a “fact-based justification” for why the requestor needs the identity of the potentially unmasked person in order to do their job;

The government to save all documents related to unmasking requests for five years;

Additional signoff for unmasking requests made during Presidential transition periods;

Most important, an Intelligence community element head (basically the top official at the agency, bureau or department) to sign off on requests.

An official familiar with the matter told Defense One over email that the announcement from Coates on Friday was not timed to save the FISA vote. But asked whether the announcement was planned before 7:30 a.m. on Thursday, the official did not respond.

Update:

Following the publication of this article, the official wrote an email to say that the announcement for Thursday was planned prior to Thursday.