MOSCOW — Before American fugitive Edward Snowden arrived in Moscow in June — an arrival that Russian officials have said caught them by surprise — he spent several days living at the Russian Consulate in Hong Kong, a Moscow newspaper reported Monday.

The article in Kommersant, based on accounts from several unnamed sources, did not state clearly when Snowden decided to seek Russian help in leaving Hong Kong, where he was in hiding in order to evade arrest by U.S. authorities on charges that he leaked top-secret documents about U.S. surveillance programs.

Snowden arrived in Moscow on June 23 and spent more than a month stranded at Sheremetyevo International Airport, with his U.S. passport revoked and Washington urging other countries not to accept him.

On Aug. 1, Russia granted him temporary asylum, angering the United States. The 30-year-old former intelligence analyst is now living in Moscow.

Kommersant reported Monday that Snowden purchased a ticket June 21 to travel on Aeroflot, Russia’s national airline, from Hong Kong to Havana, through Moscow. He planned to fly onward from Havana to Ecuador or some other Latin American country.

That same day, he celebrated his 30th birthday at the Russian Consulate in Hong Kong, the paper said, though several days earlier he had had an anticipatory birthday pizza with his lawyers at a private house.

Kommersant cited conflicting accounts as to what brought Snowden to the consulate, on the 21st floor of a skyscraper in a fashionable neighborhood. It quoted a Russian close to the Snowden case as saying the former NSA contractor arrived on his own initiative and asked for help. But a Western official also interviewed by the newspaper alleged that Russia had invited him.

As of mid-afternoon Monday, the Russian Foreign Ministry had not responded to a request for comment on the Kommersant article.

Until now, Russian officials have said that Snowden’s arrival in Moscow was a surprise, and not entirely welcome.

“[W]e were unaware he was coming here,” Putin spokesman Dmitry Peskov said to the Wall Street Journal on June 24.

Snowden never made it to Havana. The United States revoked his passport and sought his return to the United States to stand trial.

Kommersant quoted unnamed Russian officials as saying the Cubans decided to refuse Snowden entry under U.S. pressure, leaving him stranded. That version stands in contrast to widespread speculation that the Russians never intended to let the former CIA employee travel onward.