UNITED NATIONS — The United Nations adopted a resolution on Tuesday urging all countries to protect the right to privacy in digital communications and to offer their citizens a way to seek “remedy” if their privacy is violated.

Though not legally binding, the resolution signaled growing international attention to the issue of digital privacy, which it described as a human right.

The measure passed by consensus in the General Assembly’s human rights committee, which meant that it was not put up for a vote. But it was a result of intense closed-door negotiations, and it set the stage for a showdown in Geneva next spring, when the issue is expected to go to the Human Rights Council. Privacy advocates are pushing for the United Nations to establish a special envoy.

Germany and Brazil led the effort to seek the resolution after their leaders, Chancellor Angela Merkel and President Dilma Rousseff, expressed anger over reports, fed by documents harvested by the former National Security Agency contractor Edward J. Snowden, that American intelligence agencies had spied on their communications.