Trump's tweet on Jan. 11 created chaos in the House just before it voted to reauthorize what is known as Section 702 of the Foreign Intelligence Surveillance Act. He linked the intelligence program to a dossier that alleges his presidential campaign had ties to Russia.
That caused people to wonder if he didn't support the program that allows U.S. spy agencies to collect intelligence on foreign targets abroad.
"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?" the presidential tweet said.
Trump and other Republicans have alleged that Obama administration officials improperly shared the identities of Trump presidential transition team members mentioned in intelligence reports. Democrats say there is no evidence that happened.
Shortly before the House vote, and after conferring with House Speaker Paul Ryan, Trump did an apparent about-face.
"This vote is about foreign surveillance of foreign bad guys on foreign land," he tweeted. "We need it! Get smart!"
In his tweet announcing that he has just signed the bill, Trump wrote: "This is NOT the same FISA law that was so wrongly abused during the election. I will always do the right thing for our country and put the safety of the American people first!"
There are no obvious links between the dossier Trump spoke of, which includes salacious but unsubstantiated allegations against him, and the reauthorization of the spying program, or between the program and Trump's oft-repeated claims that the Obama administration conducted surveillance on Trump Tower during the presidential campaign.
Copyright 2018 The Associated Press. All rights reserved. This material may not be published, broadcast, rewritten or redistributed.