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

The US Senate has blocked a bill that would have extended the bulk collection of Americans' phone records by the National Security Agency (NSA).

Senators are to discuss the issue again on 31 May - a day before existing legislation permitting surveillance is due to expire.

A US appeals court has already ruled the bulk collection illegal.

The NSA's spying was leaked by Edward Snowden, a former NSA contractor who has since fled to Russia.

The NSA has collected data about numbers called and times, but not the content of conversations. It also allegedly spied on European firms.

Among individuals targeted was German Chancellor Angela Merkel.

The White House has pressed the Senate to back a bill passed by the House of Representatives which would end bulk collection of domestic phone records but allow the NSA to search records on a case-by-case basis.

Supporters of the proposed USA Freedom Act, including privacy and civil rights advocates, say it protects privacy while preserving national security powers.

The Snowden revelations in June 2013 caused an international outcry, despite US administrations insisting the programme has been fully authorised.

The measures have been repeatedly approved in secret by a national security court since 2006.

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

US spy leaks: How intelligence is gathered

How vulnerable is the internet?

US states take aim at NSA facilities

Clarification 24 May: This article was amended to make clear that the USA Freedom Act would extend surveillance powers on a case-by-case basis.