* Ruling party loses a third of seats in Moscow - agencies
* But party retains its majority in Moscow legislature
* Setback follows biggest street protests in years
* Opposition advised people to vote tactically (Adds voting by the military, final results)
MOSCOW, Sept 9 (Reuters) - Russia's ruling United Russia party, which supports President Vladimir Putin, has lost one third of its seats in the Moscow city assembly, final polling data cited by Russian news agencies showed on Monday, in an awkward setback for the Kremlin.
However, the party retained its majority in the Moscow assembly following Sunday's nationwide local elections, and its candidates for regional governor appeared to have won in St Petersburg and in 15 other parts of the vast country.
The outcome of the local elections was closely watched in Moscow after the exclusion of many opposition candidates triggered the biggest protests there in nearly a decade.
Public anger over more than five years of falling incomes and an unpopular hike in the pension age also helped fuel the Moscow protests, with the Communist Party benefiting most in Sunday's polls from the discontent.
Putin's spokesman told reporters the Kremlin thought United Russia had done well despite the setback in Moscow.
"The party showed its political leadership," said the spokesman, Dmitry Peskov.
Prominent opposition politician Alexei Navalny and his allies saw the Moscow poll as an opportunity to make inroads against United Russia ahead of a national parliamentary election in 2021.
Navalny's close allies were among those excluded from the Moscow vote and he had advised supporters to vote tactically for the candidates with the best chance of defeating United Russia.
He saw the results as vindicating his strategy, though other activists were unhappy that he had asked people to hold their noses and vote for parties that cooperate with the Kremlin.
United Russia won 25 of the Moscow assembly's 45 seats, final data showed.
In the last Moscow election in 2014, United Russia performed better, winning 28 seats in its own name and a further 10 through independent candidates whom it had backed.
This time round, all of its Moscow candidates rebranded as independents in an apparent effort to distance themselves from their party, whose popularity is at a more than decade-long low.
The Communist Party won 13 seats on Sunday, up from five, at the expense of United Russia, the data showed. The opposition Yabloko Party won four seats, and the Fair Russia Party three.
Several videos circulating on social media showed some voters openly stuffing ballot boxes with multiple voting slips.
At least six Russian soldiers in Moscow told Reuters they had been coerced into voting and told to provide photographic evidence that they had cast their ballot to their superiors.
Press-ganging soldiers into voting is a tactic used to boost low turnout in Moscow and is also meant to skew results in favour of pro-Kremlin candidates, critics say. Turnout in Moscow on Sunday was just under 22%, data showed.
"We are being forced to vote and we have to report to the bosses," said one soldier wearing civilian clothes who declined to be named. "We are not told who to vote for but we are told to fulfil our civic duty."
The defence ministry did not respond to a request for comment.
Sunday's local and regional elections took place across all of Russia's 11 time zones. United Russia also suffered a setback in an election for the Khabarovsk region's local parliament in the Far East, winning just two seats.
But the main focus was on Moscow, where the Central Election Commission refused in July to register a large number of opposition candidates, saying they had failed to collect enough signatures from genuine backers.
That decision triggered the biggest sustained protest movement in Russia since 2011-2013.
Putin's own popularity rating, at more than 60%, is much higher than most Western leaders, though lower than it has been previously. The former KGB officer won a landslide election victory last year that will keep him in office until 2024.