An undated aerial handout photo shows the National Security Agency (NSA) headquarters building in Fort Meade, Maryland.[Photo/Agencies]

WASHINGTON - The U.S. National Security Agency (NSA) on Sunday ended its mass phone surveillance program and replaced it with a focused and targeted domestic surveillance program.

Under the new program, the NSA is prohibited from collecting telephone metadata in bulk under the post 9/11 Patriot Act, as it had been doing for years even after revelation by former NSA contractor Edward Snowden in 2013.

Instead, the NSA will have to make a request to relevant telephone companies and be granted a court order to get access to metadata records based on specific cases.

According to a statement by the Office of the Director of National Intelligence on Friday, the federal government will report annually to Congress and to the public the total number of orders issued and the number of targets of such orders.

Phone metadata include information such as phone numbers, as well as the time and length of calls. Conversation of calls are not included in the records.

The reform was a result of a new law passed in June and came more than two years after Snowden revealed the U.S. government's underground spying program, which triggered heated debates about privacy and national security.

After the terrorist attacks in Paris earlier this month, however, some Republican lawmakers were currently seeking further preservation of the bulk metadata collection program until 2017.