MOSCOW  -  Holding up a megaphone, Alexei Navalny shouted his thanks to hundreds of ecstatic supporters, who held out flowers and lifted him over their heads at a grimy Moscow rail station.

Hand in hand with his elegant wife Yulia, Russia’s main opposition leader had stepped off the overnight train from the northeastern city of Kirov on a grey morning after being unexpectedly freed from jail pending an appeal against a five-year sentence on embezzlement charges.

Along with the supporters, police were there to meet him, with five officers in camouflage gear stationed outside his carriage at the Yaroslavsky railway station in central Moscow.  One policeman filmed everyone who came out. Police in riot helmets linked arms to hold back supporters who massed on an opposite platform and beyond the ticket barriers, some wearing T-shirts reading “Navalny’s brother”.

A few who managed to breaking through handed bouquets of roses and chrysanthemums to Navalny’s wife. Grabbing a megaphone, Navalny thanked supporters for helping him escape prison, using the confident, slangy style of his rally speeches. “I didn’t doubt for a second that we would win. I just didn’t believe it would only take two days!” he shouted hoarsely.  “I want to say ‘sorry’ for not believing in you enough.”

He confirmed that his bid for Moscow mayor was back on track, having registered as candidate shortly before his conviction on Thursday.  “The campaign will continue,” vowed Navalyy, 37. “Let’s get to work.”

The excited crowd responded with cheers and shouts of “Navalny is our mayor” while a few of them hoisted the opposition leader up above their heads.

A scrum of supporters and journalists streamed in Navalny’s wake, startling travellers and homeless people, while guards watched smiling from a train doorway.

A station announcer appealed repeatedly: “Let the passengers through!” as Navalny tried to help get the crowd under control.  “There are loads of passengers behind us and we shouldn’t cause them inconvenience,” he said.

Chatting to supporters, he asked about the unsanctioned protests against his conviction that broke out in central Moscow late Thursday.

Alone in a quarantine cell deep inside a Kirov prison, he knew nothing of the rallies at the time, he said.

“I was absolutely isolated from any information.”

As a tireless Twitter user, he admitted that it was a “great joy” to be back online, to laughter from supporters familiar with his pithy messages.

Still tailed by supporters and journalists, the opposition leader finally got into a black SUV with his wife and drove away.

“Thanks a lot, see you at my headquarters!” he shouted as he got in.

He later tweeted: “What happened at Yaroslavsky station and the people who were there are the best inspiration. Thanks to everyone, and we will never give up.”