Former US spy agency contractor Edward Snowden has secured temporary asylum in Russia, ending more than a month in limbo in the transit area of Moscow’s Sheremetyevo airport.

In a statement released by Wikileaks, Mr Snowden said Russia's decision was a victory for the rule of law, while accusing the Obama administration of flouting international law.

A Russian lawyer who has been assisting Mr Snowden said the American has gone to a safe location which would remain secret.

After 39 days avoiding hordes of reporters desperate for a glimpse of him, Mr Snowden managed to give them the slip again, leaving the airport in a taxi without being spotted.

Mr Snowden's case has caused new strains in relations between Russia and the US, which wants him extradited to face espionage charges.

Grainy images on Russian television showed Mr Snowden's new document, which is similar to a Russian passport, and revealed that he had been granted asylum for a year from July 31.

His lawyer, Anatoly Kucherena, refused to be pressed on where Mr Snowden was going now.

"He is the most wanted man on planet Earth. What do you think he is going to do? He has to think about his personal security. I cannot tell you where he is going."

"I put him in a taxi 15 to 20 minutes ago and gave him his certificate on getting refugee status in the Russian Federation," he said. "He can live wherever he wants in Russia. It's his personal choice."

He said Mr Snowden, who had his US passport revoked by Washington after he fled to Moscow from Hong Kong on 23 June, was not going to stay at an embassy in Moscow, although three Latin American countries have offered to shelter him.

Mr Snowden, 30, was accompanied by Sarah Harrison, a representative of the anti-secrecy group WikiLeaks, which confirmed he had left the airport.

"We would like to thank the Russian people and all those others who have helped to protect Mr Snowden. We have won the battle - now the war," WikiLeaks said on Twitter.

Nicaragua, Bolivia and Venezuela have offered Mr Snowden refuge, but there are no direct commercial flights to Latin America from Moscow and he was concerned the US would intercept his flight to prevent him reaching a new destination.

He was forced to bide his time in the transit area between the runway and passport control, which Russia considers neutral territory.

Obama could boycott planned summit with Putin

The White House has signalled that President Barack Obama might consider boycotting a planned summit with Russian President Vladimir Putin in Moscow in early September over the Snowden case.

However Yuri Ushakov, President Vladimir Putin's top foreign policy adviser, played down concerns.

He told reporters that "our president has expressed hope many times that this will not affect the character of our relations."

He also said there was no sign that President Obama would cancel the planned visit in September.

It is not clear what Mr Snowden plans to do in Russia, although he has said he would like to travel around the country.

More than half of Russians have a positive opinion of Mr Snowden and 43% wanted him to be granted asylum, a poll released by independent research group Levada said this week.

Mr Snowden's arrival at Sheremetyevo put Mr Putin in an awkward position. He has said he does not want the case to undermine relations with Washington but would have risked looking weak if he had handed him over to the US authorities.

US-Russia relationship strained over Snowden issue

Both Russia and the US have signalled they want to improve ties, strained by issues ranging from the Syrian conflict to Mr Putin's treatment of opponents and Western-funded non-governmental organisations since he started a third term in 2012.

Mr Putin has said Mr Snowden must stop anti-US activities, but it was not clear whether the American had agreed to do so.

Mr Snowden has said previously that he does not regard his activities as hostile to the US, although Mr Kucherena has said his client has agreed to halt such actions.

There has already been diplomatic fallout from Mr Snowden's leaks, which included information that the US National Security Agency bugged European Union offices and gained access to EU internal computer networks, even though the EU is an ally.

China, Brazil and France have also voiced concern over the spying programme.

US relations with Latin American states have been clouded by the refusal of four US allies in Europe to let a plane carrying Bolivia's president home from Moscow use their airspace because of suspicion that Mr Snowden might be on the plane.