The United States defended its controls on mass surveillance on Friday before a UN watchdog body amid a sweeping review of Washington's record on civil and political rights.
The US government has faced a cascade of scandals over online and telephone snooping around the globe by the US National Security Agency (NSA) since fugitive former intelligence contractor Edward Snowden went public in 2013.
During a session of the United Nations Human Rights Committee, experts from the 18-member panel repeatedly quizzed Washington's delegation about the scale and scope of spying.
Bruce Swartz, deputy assistant attorney general for the criminal division at the US Department of Justice, underlined that the intelligence programmes in the spotlight were "lawful under the law of the United States".
"The intelligence collection in question is only for a valid purpose, and that is for foreign intelligence for counter-intelligence purposes," Swartz insisted.
"The collection does not intend to, or have the effect of, changing or challenging freedom of expression. Nor is it designed to or does it have the effect of disadvantaging people based on their ethnicity, on their race, on their gender, on their sexual orientation," he added.
In addition, Swartz said, there was "rigorous oversight" by a host of authorities and the courts.
And he underlined that the government had over the last year conducted an extensive review of its intelligence practices.
President Barack Obama has announced a range of new safeguards, Swartz told the panel, saying the goal was to protect the personal information "all citizens from around the world regardless of their nationality".
"Progress is being made," he said.
Is NSA surveillance proportionate?
Earlier Friday, Yuji Iwasawa, a Japanese international lawyer who sits on the UN committee, had along with other members raised concerns about surveillance.
Pressing the delegation, he asked: "Is NSA surveillance to achieve legitimate objectives? Is it proportionate to those aims?"
He also spotlighted intelligence gathering at home, under the USA Patriot Act, crafted by the administration of president George W. Bush after the September 11, 2001 attacks.
"I understand that the US government maintains that the programme has contributed to disrupting potential terrorist plots. But is it truly necessary to collect numerous telephony metadata at the expense of US citizens' privacy?" Iwasawa said.
On Tuesday, Vice Admiral Michael Rogers, the nominee to head the NSA, had defended the use of bulk data collection in order to thwart attacks but also said he wanted more transparency about the secretive spy service.
During a two-day session which wrapped up Friday, the UN committee also probed other areas of the rights impact of the "war on terror".
Pressed on its treatment of minors, the US delegation said that approximately 2,500 individuals who were under the age of 18 at the time of their capture had been held in Iraq, Afghanistan and at Guantanamo Bay.
"We are not currently detaining anyone under the age of 18 in an armed conflict," Brigadier General Richard Gross, legal counsel at the Department of Defense, told the committee.
He later explained to AFP that all such individuals had been released, rather than still being behind bars after having turned 18, and that most had been held in Iraq.
The committee also questioned Obama's efforts to close Guantanamo, a lock-up created by the Bush administration, where 154 inmates are still being held.
Critics repeatedly have faulted Obama's failure to shutter the facility, despite a strategic rethink in the "war on terror" after he came to power in 2009.
"We knew the process would be difficult and complex," Gross said.
The committee also probed issues ranging from racism in the justice system to treatment of illegal migrants.
Like all UN members, the United States is meant to submit to periodic reviews of its respect for the International Covenant on Civil and Political Rights.
The committee conclusions on the US hearing are due for release on March 27.
Explore further: Cyberattack targets The Seattle Times website