* Seven anti-protesters given prison sentences
* Navalny and Pussy Riot activists detained twice
* Upheaval in Ukraine hangs over court hearing
* Sentencing unlikely to spur major challenge to Putin
* EU and Britain criticise trial and detentions (Adds new detentions, EU criticism)
By Thomas Grove and Ian Bateson
MOSCOW, Feb 24 (Reuters) - Russian riot police detained hundreds of Kremlin opponents on Monday, moving swiftly to curb protests over the jailing of activists convicted of attacking police at a rally against President Vladimir Putin.
With the turmoil in Ukraine adding to tension between the Kremlin and its opponents, Putin foes including Alexei Navalny and members of protest band Pussy Riot were hauled away twice by police, first outside a courthouse and later near the Kremlin.
A judge sentenced seven men to prison terms ranging from 2-1/2 to four years after finding them guilty of rioting and violence against police at a protest on May 6, 2012, the day before Putin returned to the presidency for a third term.
The prison sentences and the detention of activists protesting them drew criticism from Europe, adding to strains between Russia and the West at a time when they are deeply at odds over the future of Ukraine.
Outside the court, activists who blame police for clashes at the 2012 anti-Putin rally shouted "shame" and "Maidan" - a reference to the Kiev square at the centre of protests that led to the overthrow of Ukrainian President Viktor Yanukovich.
Relatives and lawyers of the seven said they believed the upheaval in Ukraine, where police were among the dead in a conflict the Kremlin blames on opposition leaders and the West, had prompted the court to impose prison sentences as a signal that such actions would not be tolerated in Russia.
"These sentences are cruel and wrong. They were handed down because of the political situation," said defence lawyer Dmitry Agranovsky, who said he would appeal against his client's conviction. "We hope our appeal will show that they made a mistake and the defendants won't have to answer for the Maidan."
A Russian state TV news show host linked the trial with the events in Ukraine in a broadcast on Sunday, saying the bloodshed that killed at least 82 people in Kiev last week had started with actions similar to the 2012 Moscow protest.
Russian authorities say the convicts came to Moscow's Bolotnaya Square bent on rioting and attacked police with improvised weapons such as rocks, bottles and chunks of asphalt.
Kremlin critics say police started the violence in a deliberate attempt to discredit the opposition and quash a wave of protests as Putin, in power since 2000, started a six-year third presidential term. They describe the convicts as victims of a "show trial" designed to suppress dissent.
The British Foreign Office said the sentences highlighted "concerns felt by many about the restrictions on freedom of assembly and expression in Russia".
A spokeswoman for EU foreign policy chief Catherine Ashton, who visited Ukraine on Monday, said it raised questions about the rule of law and "concerns as to the impact of such trials on the exercise of freedom of expression and assembly in Russia".
"The arrest of dozens of people who had gathered outside the court to hear the verdict is an additional source of concern," she added.
Opposition activists said more than 230 people were detained by riot police who grabbed protesters and dragged them to waiting buses. Police put the figure at more than 100.
Pussy Riot's Maria Alyokhina tweeted a photo of her and bandmate Nadezhda Tolokonnikova with the wire-mesh window of a police van as backdrop.
They were released but detained again after dark, when police mounted major presence outside the Kremlin and prevented protesters from gathering, halting people at metal barriers and subway exits. Activists said more than 315 people were detained, while Moscow police put the number at about 70.
The modest crowds indicated that even with a jolt of inspiration from the protests that put Ukraine's Russian-backed president to rout, Putin's opponents would face an uphill battle in reviving the demonstrations that alarmed the Kremlin when they erupted after a disputed parliamentary election in 2011.
Putin remains by far the most popular politician in Russia.
In December, he engineered the release of Tolokonnikova and Alyokhina in an amnesty and freed long-jailed ex-tycoon Mikhail Khodorkovsky with a pardon - moves widely seen as an effort to improve his image before the 2014 Winter Olympics, a prestige project that ended on Sunday in Sochi.
After reading part of the verdict on Friday, trial judge Natalya Nikishina abruptly called a break until Monday, stirring speculation the Kremlin wanted to keep the sentences under wraps until after the Olympic closing ceremony.
One of the eight defendants, a 20-year-old woman, was given a suspended sentence that will allow her to avoid jail.
Putin denies interfering in court cases, but has said anyone who attacks police must be punished. His spokesman, Dmitry Peskov, declined to comment on the verdict or sentences.
(Writing by Steve Gutterman; Editing by Ralph Boulton and Alison Williams)
Our Standards: The Thomson Reuters Trust Principles.