The US Senate has rejected legislation aimed at reforming NSA intelligence gathering, a blow to President Barack Obama and others who support ending the bulk collection of Americans' telephone records.

The House of Representatives passed the measure overwhelmingly last week.

Democrats and Republicans were united in their desire to rein in the National Security Agency's highly controversial program that scoops up data from millions of US citizens with no connection to terrorism.

But it got hung up in the Senate, where it fell three votes shy of the 60 necessary to advance in the chamber.

The Senate immediately turned to consideration of a two-month extension that would temporarily reauthorise the telephone data program and other parts of the USA Patriot Act which are set to expire on 1 June without congressional action.

But that bill failed to reach the 60-vote threshold as well.

When Senate Majority Leader Mitch McConnell proposed quickly voting on extensions lasting until 8 June, or 5 June, or even 3 June - two days after Congress returns from its break - Republican Senator Rand Paul objected, placing the fate of key national security provisions in jeopardy.

In addition to the telephone metadata collection, provisions authorising roving wiretaps and lone-wolf tracking are also set to expire when the clock strikes midnight at the end of May.

With politicians looking for a solution before the Senate goes on a scheduled one-week break, the White House yesterday drove home the very real prospect that national security operations could lapse on 1 June.

"There is no plan B," acknowledged White House spokesman Joshua Earnest to reporters.

"These are authorities that Congress must legislate (and are) critically important to ensuring that the basic safety and security of the American people is protected, and that the basic civil liberties of the American people are protected."

The data collection program was exposed two years ago by former NSA contractor Edward Snowden, who is now a fugitive in Russia.

After failing to get an extension, Mr  McConnell said the Senate would return to Washington on Sunday, May 31, one day before the scheduled end of its Memorial Day holiday break, to consider ways to address the imminent expiration of the Patriot Act provisions.