Russia - President Dmitry Medvedev scolded leaders of Russia's ruling party on Saturday for bad political habits and ordered them to win future elections fairly.

In his sharpest criticism so far of United Russia, which dominates Russian political life, Medvedev told the party's annual congress in St Petersburg that some regional branches had failed to allow voters to express their will.

Elections which are intended to be ... a competition of ideas and programs, are sometimes turned into affairs in which democratic procedures are confused with administrative ones, the president said in a brief opening speech.

We need to learn to win -- all of us, in fact -- we need to learn to win in open contests, Medvedev told more than 600 party delegates in a session broadcast live on state television. His remarks were greeted with polite applause.

But outside the congress hall, police detained 13 members of the National Bolsheviks, a small, banned opposition political movement, as they attempted to deliver an appeal to Medvedev to dismiss Prime Minister Vladimir Putin's government.

In our petition to Medvedev we promised support for his course of modernization and as a first step we suggested he fire Putin from the post of prime minister and stop working with United Russia, St Petersburg National Bolshevik leader Andrei Dmitriyev told Reuters by telephone from a police station.

Police told the protesters they were being detained for crossing a pedestrian crossing illegally at a red light, a charge they denied.

United Russia, headed by Medvedev's mentor and Kremlin predecessor Vladimir Putin, crushed opposition parties in regional elections held across much of Russia in October.

Critics said the poll was marred by reports of multiple voting, dubious counts, slanted campaigning and obstruction of opposition candidates but election officials dismissed complaints and Medvedev initially congratulated the victors.

Watched by Putin, who is now prime minister, from the audience, Medvedev said United Russia had to change. Critics compare it to the Soviet-era Communist Party in its dominance of political and public life.

The party ... is only an instrument, Medvedev told delegates. Yes, a very important, absolutely necessary instrument but just an instrument, a means but not an end.

As he spoke, Putin sat among delegates looking through his papers, making notes and periodically chatting with United Russia leader Boris Gryzlov.

He joined in the brief bursts of applause which punctuated the president's speech but rarely looked up at Medvedev. The United Russia congress was one of the rare occasions in the Russian political calendar when the two leaders appear together.

Putin spoke to delegates straight after Medvedev, giving a detailed exposition on how Russia's economy would recover from the financial crisis and resume growth.

His speech lasted more than an hour and contained detailed measures to launch a government-backed car scrappage scheme and aid to help the mortgage market. It was greeted with a standing ovation and enthusiastic applause.

Putin did not address Medvedev's criticism of the political system but did warn United Russia members against regarding their party as an elite prestige club for their own benefit.
Medvedev was hand-picked by Putin to succeed him in the Kremlin and was elected with the help of the United Russia party machine.

Since he took office 18 months ago, Medvedev has frequently criticized Russia's economy and political system but diplomats and businessmen say little has changed in practice and question his ability to push through fundamental change.

(Additional reporting by Denis Pinchuk; Writing by Michael Stott; Editing by Jon Hemming)