President Donald Trump threw a scheduled congressional vote on a surveillance bill into chaos Thursday morning when he unexpectedly tweeted criticism of it, apparently in response to a Fox News segment.

He then walked it back an hour and a half later.

Top Intelligence Committee Republicans and Democrats had been working with Trump administration officials on legislation renewing Section 702 of the Foreign Intelligence Surveillance Act (FISA) amendments — which allows for warrantless surveillance of foreigners and is set to expire.

Civil liberties advocates on both the left and right have criticized Section 702 as overly broad, and argued that American communications are often swept up in the surveillance too. Still, the bill was expected to pass the House of Representatives today with a combination of Democratic and Republican votes.

Then at around 7:33 am, Trump tweeted:

“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

(There’s no indication that FISA was used to “badly surveil and abuse the Trump Campaign.”)

Axios’s Jonathan Swan reported that Hill Republicans began speculating about who might have “got to” Trump and encouraged the tweet. But Matt Gertz, who does yeoman’s work for Media Matters checking which Trump tweets appear to match up with recent Fox News segments, found that Trump’s tweet was in fact quoting a Fox News chyron:

Left, Fox & Friends, 6:46 am

Right, Trump, 7:33 am pic.twitter.com/hvxAc93EyK — Matthew Gertz (@MattGertz) January 11, 2018

Gertz further pointed out that during this segment, Fox commentator Andrew Napolitano connected the pending bill to supposed “surveillance” of Trump during the campaign, and urged him not to support the measure:

During the segment, after claiming that Trump's "woes began" with "surveillance of him," Andrew Napolitano literally turns to the camera and says, "Mr. President, this is not the way to go." pic.twitter.com/W8NrtDDP3I — Matthew Gertz (@MattGertz) January 11, 2018

Trump’s tweet caused congressional Republicans a good deal of distress, and made them question whether conservative defections could sink the bill the president was criticizing. The Weekly Standard’s Stephen Hayes reported that at one point this morning, GOP leaders considered pulling the bill altogether. And Rep. Adam Schiff (D-CA), the top Intelligence Committee Democrat (who supports the bill), recommended it be temporarily pulled in response to Trump’s “irresponsible” comments.

Finally, it seems, someone reminded Trump that, contrary to what he might have seen on TV, his administration supports passing the FISA bill. So an hour and a half or so after his first tweet, he sent this follow-up to try to “clarify” that:

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

As of press time, the House of Representatives is still planning to hold the FISA vote soon. So despite the temporary chaos, Trump’s TV watching and tweeting may not make a difference to the fate of the legislation in the end. Instead, it serves mainly as a reminder of how the political system has learned to ignore or dismiss the president’s off-the-cuff statements on policy.