Image copyright AP Image caption The NSA has come under increased scrutiny since the Edward Snowden revelations

The legal authority for US spy agencies to bulk collect Americans' phone data has expired, after the Senate failed to reach a deal.

Republican presidential hopeful Rand Paul blocked a Patriot Act extension and it lapsed at midnight (04:00 GMT).

However, the Senate did vote to advance the White House-backed Freedom Act so a new form of data collection is likely to be approved in the coming days.

The Freedom Act imposes more controls, after revelations by Edward Snowden.

The former National Security Agency (NSA) contractor first exposed the extent of the data collection in 2013.

'Roving wiretaps'

The White House described the expiry of the deadline as an "irresponsible lapse" by the Senate.

"On a matter as critical as our national security, individual senators must put aside their partisan motivations and act swiftly. The American people deserve nothing less," it said in a statement.

Media playback is unsupported on your device Media caption Rand Paul: "This is what we fought the revolution over"

The failure to reach a deal means that security services have temporarily lost the right to bulk collect Americans' phone records, to monitor "lone wolf" terror suspects and to carry out "roving wiretaps" of suspects.

The government can still continue to collect information related to any foreign intelligence investigations.

Analysts also said there could be workarounds to allow continued data collection in some cases. Authorities could try to argue that older legal provisions - so-called grandfather clauses - still apply.

A Senate vote on the Freedom Act can come no earlier than 05:00 GMT on Tuesday.

The Freedom Act retains most of the Patriot provisions, but requires that records must be held by telecommunications companies, and that the NSA needs court approval to access specific information. It also explicitly prohibits bulk collection of data.

"It is officially a new day in America. A day with more liberty and freedom. #StandWithRand" Mr Paul tweeted on Sunday night.

'Silver linings'

The NSA, which runs the majority of surveillance programmes, stopped collecting the affected data at 19:59 GMT on Sunday.

The failure to reach any agreement in the rare Sunday sitting of the Senate was the result of the actions of Rand Paul.

A libertarian, Mr Paul used a Senate technical procedure to block an extension of the Patriot Act, arguing that data collection is illegal and unconstitutional.

Two weeks ago, he led a filibuster - using extended debates to delay or block the passing of legislation - to stop the quick passage of the Freedom Act.

Patriot Act vs Freedom Act

What is changing? The expiry of the Patriot Act brings to an end bulk collection of Americans' phone metadata - who called who, when and for how long, but not the content of calls - by the US. Under its successor, records must be held by telecommunications companies and investigators need a court order to access specific information. Technology companies will be given greater leeway to reveal data requests. The measures are intended to balance concerns on privacy with providing the authorities the tools they need to prevent attacks.

What stays the same? Key parts of the Patriot Act are retained in the Freedom Act. They include the provision allowing the monitoring of "lone wolf" suspects - potential attackers not linked to foreign terror groups, despite the US authorities admitting the powers have never been used. The Freedom Act also maintains a provision allowing investigators to monitor travel and business records of individuals, something law officers says is more effective than bulk collection.

On Sunday he said: "This is what we fought the revolution over, are we going to so blithely give up our freedom?"

After the deadline passed, he added: "Tonight begins the process of ending bulk collection. The bill will ultimately pass but we always look for silver linings. I think the bill may be replacing one form of bulk collection with another but the government after this bill passes will no longer collect your phone records."

His actions have infuriated many other Republicans. They left the chamber en masse when Mr Paul rose to speak.

Media playback is unsupported on your device Media caption Former US Deputy Undersecretary of Defence Jed Babbin: "Mr Paul is dangerously ignorant of the constitution"

Senator John McCain said Mr Paul was putting "a higher priority on his fundraising and his ambitions than on the security of the nation".

The situation was uncomfortable for Senate Majority Leader Mitch McConnell, who has endorsed Mr Paul's presidential campaign, and led to a dramatic reverse by the Republican-controlled Senate.

Bulk data collection rulings

NSA phone surveillance first revealed in June 2013 by Edward Snowden

Federal judge in Washington rules in December 2013 that mass collection may be unconstitutional

A week later, a New York district judge says it is legal

House of Representatives passes bill in May 2014 to end NSA bulk collection

A few days later, President Barack Obama tells Congress to pass a bill ending the practice

US spy leaks: How intelligence is gathered

The Freedom Act had been approved by the House of Representatives and the White House but the Senate rejected it last week by a vote of 57-42.

Once it became clear that the Patriot Act extension would not be possible, senators voted 77-17 to move forward with the Freedom Act.

Media playback is unsupported on your device Media caption Security expert Bruce Schneier: "It is not a big win but it is a win"

Mr McConnell, who had opposed the bill originally, said that senators were left with little choice but to pass it in order to restore surveillance powers.

"It's not ideal but, along with votes on some modest amendments that attempt to ensure the program can actually work as promised, it's now the only realistic way forward," Mr McConnell said.

The BBC's North America Editor Jon Sopel says that although the new legislation is likely to be passed in the coming days, the delay will be seen as a victory for Mr Paul.

Mr Paul's embrace of civil liberties is bringing new members to the Republican Party, but at the same time is alienating many others, he says.

Meanwhile, polling by the US-based Pew Research Centre suggests a minority of Americans think the government has overreached in its collection of telephone and internet data.

In a 2015 poll, only 37% of 1,504 polled said they think the government has gone too far.

US media response

The New York Times says "the expiration of surveillance authority demonstrates a profound shift in American attitudes since the days after the Sept. 11, 2001, terrorist attacks, when national security was pre-eminent in both parties". It also suggests the spy agencies might find "workarounds" to avoid gaps in surveillance

The Washington Post quotes national security expert Elizabeth Goitein as saying that Senate Majority Leader Mitch McConnell had gambled and "badly overplayed his hand"

Time magazine says that Mr Paul scored a victory that was "messy and almost certain to be brief" but for him "the real audience was the Republican electorate that will pick a White House nominee next year, along with potential donors who can fund his campaign"

The Daily Beast called Rand Paul "GOP Enemy No. 1", quoting Republican Sen. Mark Kirk as saying, "I don't stand with Rand," poking fun at his campaign slogan.