The House on Thursday passed a 45-day extension of a controversial foreign surveillance program, voting just as the program was set to expire.

The Senate earlier Thursday passed the measure, which will next go to President Donald Trump for his signature next. The president has urged Congress to reauthorize the program.

Section 702 of the Foreign Intelligence Surveillance Act of 1978 allows the government to collect the communications of people outside the U.S., including when they are interacting with Americans. Opponents have argued that extending the program without amendments could lead to abuses and the U.S. government’s spying on American citizens, while proponents say it’s a crucial national security tool.

The Senate had rejected a bipartisan House proposal to reauthorize the program for three years. That measure included unrelated language that would have banned the Federal Reserve from establishing a central bank digital currency.

Senators from both parties opposed the digital currency language and instead pivoted to their own short-term solution for FISA, punting on broader negotiations until lawmakers return to Washington in mid-May after a scheduled recess.