MOSCOW — Edward J. Snowden, the American intelligence contractor who divulged a raft of secret documents and then fled to Russia, has been granted a three-year residence permit here, his lawyer announced Thursday.

Anatoly G. Kucherena, the lawyer, told a news conference that Mr. Snowden had not been given asylum in Russia, but rather had been granted permission to live here until 2017, Russian news media reported.

His new status includes the right to leave Russia for up to three months, Mr. Kucherena said. Mr. Snowden, 31, had originally planned to head to Latin America for asylum. Anger in Germany at American surveillance has also prompted some discussion there about whether Mr. Snowden should be allowed to live there. But he has so far avoided setting foot outside Russia lest the United States find a way to arrest him.

His previous, yearlong residence permit, granted last August, expired on July 31 and a new one had been expected. His lawyer filed the necessary paperwork earlier this summer.