MOSCOW — Edward J. Snowden, an American who took refuge in Russia after leaking a trove of classified United States data from global surveillance, has criticized a proposed Russian law as an assault on freedom of speech, and has been rebuffed in an effort to collect a free-speech prize in Norway.

Mr. Snowden, who was charged by the United States in 2013 with violating the Espionage Act, was invited to Norway by a writers’ advocacy group to receive the prize, and sought guarantees in court that he would not be handed over to the American authorities. News agencies reported on Monday that a court in Oslo rejected his bid.

His criticism of the Russian law came over the weekend, when he said on Twitter that it was “an unworkable, unjustifiable violation of rights that should never be signed.” The law was passed by the lower house of Parliament on Friday; the speaker of the upper house, Valentina I. Matviyenko, signaled on Monday that her chamber would pass it as well.

“Mass surveillance doesn’t work,” Mr. Snowden wrote. “This bill will take money and liberty without improving safety.”