The Republican-controlled US House of Representatives on Thursday rejected a short-term extension of foreign surveillance powers sought by President Donald Trump in an effort to bypass a political standoff over his selection of an inexperienced loyalist to serve as the top US spy chief.

With surveillance authority due to expire at midnight on Friday, the House voted 218 to 198 to reject a measure that would have extended the spying powers until July 2. Nineteen Republicans joined most Democrats to oppose the measure.

For all the latest headlines, follow our Google News channel online or via the app.

Republican leaders had sought to extend the program for three weeks to give Trump time to find a permanent replacement for mortgage regulator Bill Pulte, whom Trump picked to serve as acting head of the country’s sprawling spy bureaucracy. Trump called for the short-term extension on Wednesday.

Ahead of the vote, House Democratic leaders vowed opposition over Pulte’s appointment and an absence of reforms that are also being sought by some Republicans. An expected effort in the Republican-led Senate was also expected to fall flat.