Brazil says the resolution establishes human rights should prevail irrespective of the medium, and need to be protected online and offline.
The UN General Assembly's human rights committee has unanimously adopted a resolution sponsored by Brazil and Germany to protect the right to privacy against unlawful surveillance, following months of reports about US eavesdropping abroad.
The symbolic resolution, which seeks to extend personal privacy rights to all people, followed a series of disclosures of US eavesdropping on foreign leaders, including Brazilian President Dilma Rousseff and German Chancellor Angela Merkel, that surprised and angered allies.
Brazil's Ambassador Antonio de Aguiar Patriota said the resolution "establishes for the first time that human rights should prevail irrespective of the medium, and therefore need to be protected online and offline".
The resolution expresses deep concern at "the negative impact" that such surveillance, "in particular when carried out on a mass scale, may have on the exercise and enjoyment of human rights".
German Ambassador Peter Wittig asked: "Is the human right to privacy still protected in our digital world? And should everything that is technologically feasible, be allowed?"
The consensus adoption of the resolution means it will also unanimously pass the whole 193-member General Assembly in December. General Assembly resolutions aren't legally binding, but reflect world opinion and carry political weight.
The United States did not fight the measure after it engaged in lobbying last week with Britain, Canada, Australia and New Zealand, which comprise the Five Eyes intelligence-sharing group, to dilute some of the draft resolution's language.
The key compromise dropped the contention that the domestic and international interception and collection of communications and personal data, "in particular massive surveillance," may constitute a human rights violation.
US delegate Elizabeth Cousens told the committee that the United States welcomed Brazil and Germany's sponsorship of the resolution and was pleased to support "privacy rights and the right to freedom of expression".
The draft resolution directs the UN human rights chief to report to the Human Rights Council and the General Assembly on the protection and promotion of privacy "in the context of domestic and extraterritorial surveillance... including on a mass scale".
Last week, five major human rights and privacy groups - Amnesty International, Human Rights Watch, The Electronic Frontier Foundation, Access and Privacy International - said this will guarantee that the privacy issue stays on the front burner at the United Nations.
Human Rights Watch general counsel Dina PoKempner said that though the resolution was "watered down" it was still a "vital first step toward stigmatising indiscriminate global surveillance as a wide-scale violation of human rights".
The director of the human rights programme at the American Civil Liberties Union, Jamil Dakwar, said: "Yet again, the US is paying lip service to human rights when it comes to holding intelligence services accountable overseas. It is regrettable that the US is investing time to circumvent the universal human right to privacy rather than setting a new course by ending dragnet surveillance."
The US has been trying to calm tensions with Brazil and Germany over the reported spying.
Rousseff cancelled a state visit to Washington after classified documents leaked by former National Security Agency analyst Edward Snowden showed that the NSA hacked the computer network of Brazil's state-run oil company Petrobras and scooped up data on emails and telephone calls flowing through the country.
Merkel and other European leaders expressed anger after reports that the NSA allegedly monitored Merkel's cellphone and swept up millions of French telephone records.