US Congress has moved to reauthorise a law which President Trump accused the Obama administration of using to spy on him.
The President had initially suggested he would oppose the law, but quickly retracted his claim in what critics described as a humiliating backpedal.
Section 702 of the Foreign Intelligence Surveillance Act (FISA) allows US authorities to conduct mass surveillance on foreign targets on US soil.
It is a controversial law which needs to be reauthorised by Congress every few years.
On Thursday, Congress gave the latest reauthorisation a nod – although the statute has yet to be given the green light by the President.
Its approval is widely supported by the intelligence community who consider its powers vital, but it is opposed by privacy advocates and civil liberties groups.
Congressmen and women were shocked when, ahead of Thursday’s vote, the President signalled that he may himself oppose the passage of the bill.
Mr Trump tweeted: 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?
Last year, British intelligence agency GCHQ made a rare public statement to dismiss utterly ridiculous claims by President Trump that it was used by the Obama administration to tap his wires before the election.
FISA ignited controversy following revelations from NSA whistleblower Edward Snowden, who brought into question whether it was adequately overseen by the courts.
Republican senator Rand Paul, an outspoken libertarian, said he intended to do everything in my power, including filibuster to prevent the passage of the bill.
Despite this, FISA is expected to be reapproved as Mr Trump later suggested a change in heart.
Almost two hours after his first tweet, he wrote: 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!
On Twitter, former intelligence personnel and commentators described the President’s second tweet as an embarrassing walkback.
Matt Tait, a former GCHQ staffer and frequent critic of President Trump, described the post as a humiliating backpedal.
(c) Sky News 2018: Trump in ‘humiliating backpedal’ over spying law