Javier Castano, 50, handed over the password for the Twitter name @riodejaneiro to Rio de Janeiro city hall -- and said Monday he now wants to do the same with the handle @japan for the 2020 Tokyo Olympics.
Castano registered several key Twitter account names in 2007, when the online social network was in its early days.
He said he spent years sending messages to Rio city hall offering them the account. It said it has now finally replied to him and formally accepted.
"We are very happy to at last be able to use the name of our city on the social network," said Rio's tourism secretary Antonio Pedro Figueira Mello in a statement.
"This will be of great value now that we are getting closer to the Olympics."
Castano was formerly a graphic designer but saw work dry up in Spain's recent economic crisis. He now earns about 30 euros ($34) a day shining shoes in the street in Malaga, southern Spain.
He insisted on giving the Twitter accounts only to the legitimate representatives of the Olympic host cities, for free.
"I am a shoeshine man with not much money, but I have the privilege of being able to give a gift to 130 million Japanese people or eight million people in Rio," he told AFP. "Could you do that?"
Castano has already handed over @canada and @madrid to authorities in those places, by sending them the passwords to the accounts once they formally accepted and confirmed their identity.
"I am very happy now. My only remaining task is to hand over @japan," he said.
Japanese government officials however said they had never heard of Castano and voiced reservations about accepting Twitter accounts from private individuals.
"There is no discussion, as far as I know, about setting up new accounts," said an official who helps publish tweets for the Japanese prime minister's office.