* Opponent of Putin is underdog against Kremlin appointee
* Navalny faces five years in prison if he loses appeal
* Strong showing after lively campaign could rattle Kremlin (Adds Putin, no major fraud allegations, other details)
By Gabriela Baczynska and Maria Tsvetkova
MOSCOW, Sept 8 (Reuters) - Russian opposition leader Alexei Navalny faced off against a Kremlin ally on Sunday in a Moscow mayoral election with high stakes for both President Vladimir Putin and his foes.
The contest to head Russia's capital will help shape Putin's six-year third term and the fortunes of two politicians who could play bigger roles in the future.
For underdog Navalny, 37, an anti-corruption campaigner who emerged from a wave of street protests as the driving force of opposition to Putin's 13-year rule, the vote is a chance to show many Russians want change and he is the man to make it happen.
It pits him against Sergei Sobyanin, a former Putin administration chief who was appointed to a five-year term as mayor by the Kremlin in 2010 but called an early vote to bolster his legitimacy and try to extend his time in office.
Irina, a Muscovite in her 40s who works in manufacturing and on Sunday voted with her father, cast her ballot for Navalny in protest against the Kremlin.
"We've both voted for Navalny, we like some things about him but first and foremost we really don't like the authorities," she said.
Several voters who chose the white-haired Sobyanin said they had seen improvements in the city since he took office.
"There is no need for any change, everything is fine here. He's got serious experience now, he's well into this job. I like the way he works and want to see more of the same," said Yevgeny.
Putin, who has praised Sobyanin and suggested Navalny lacks the experience to run a city of nearly 12 million, repeated that message on Sunday without referring to any candidate by name.
"We need businesslike, no-nonsense, I would even say ... depoliticised people - technocrats who know how to work, know what to do and how to do it," he said in televised comments after casting his ballot at the Russian Academy of Sciences.
A win for Sobyanin would put a trusted ally in office as mayor of Moscow - which accounts for more than a fifth of Russia's economy - until after the 2018 presidential election, in which Putin has not ruled out seeking a fourth term.
Even among those who voted for Navalny, there was little hope he could win and the threat of jail hangs over him.
OPPOSITION CANDIDATE FACES JAIL
He was convicted in July of stealing from a state firm and sentenced to five years in prison after a trial he and his supporters say was politically motivated.
In a highly unusual ruling, a judge released him the following day pending a ruling on appeal, enabling him to continue his mayoral campaign.
"I hope there will be no violations today, I'd very much want Muscovites today to finally be able to express their will and chose the mayor they want," Navalny, flanked by his wife Yulia and their two children, said on leaving a polling station.
Many political analysts say the Kremlin wanted Navalny to run because it expected him to be humiliated and believed this would wipe out any political threat from a critic who has presidential ambitions.
While opinion polls have shown Navalny has little or no chance of winning, his lively campaign has revived some of the enthusiasm of a flagging protest movement and may have rattled the Kremlin.
A strong showing for Navalny could deepen Kremlin concerns and boost the morale of Putin's opponents - particularly if Sobyanin were to fall short of 50 percent of the votes, forcing him into a run-off election.
Most polls have indicated that is unlikely and the Kremlin seems confident it will not happen. Kremlin sources said Putin was pencilled in to attend the mayor's inauguration this week.
Sobyanin waited in a short queue with his wife to cast votes in a upscale central neighbourood near the Russian government headquarters. They made no comments.
Navalny supporters said names were added to voter lists at the last minute to help Sobyanin. But there were no immediate reports of the kind of widespread alleged violations that sparked the protests that Navalny helped lead after a 2011 parliamentary vote won by Putin's ruling party.
Navalny and Sobyanin are among six candidates fighting for the ballots of nearly 7.2 million registered voters in Russia's biggest and wealthiest city, its main financial centre and the seat of most big Russian companies.
Some 26 percent of Muscovites had voted by 1400 GMT and the head of the Mocow election body, Valentin Gorbunov, said he expected the final turnout to top 30 percent.
The Moscow mayoral election is one of some 7,000 regional and local contests held across Russia on Sunday. (Additional reporting by Alexei Anishchuk; Writing by Steve Gutterman; Editing by Robin Pomeroy and Angus MacSwan)