Moscow (AFP) - Dmitry Medvedev secured a fresh term as Russian prime minister on Tuesday, as the lower house of parliament voted overwhelmingly for President Vladimir Putin's long-term ally to retain his post.

"I am ready to do everything for the development of our country," Medvedev said ahead of the vote in the State Duma, which Putin also attended. A total of 374 MPs backed Medvedev's candidacy while 56 voted against.

The ruling United Russia party and the ultra-nationalist LDPR party backed Medvedev, while the Communist and Just Russia parties said they opposed his candidacy.

Medvedev served a term as president from 2008 to 2012 before standing aside to become prime minister while Putin returned to the Kremlin.

Putin praised Medvedev in a speech ahead of the vote.

"All that has been accomplished in recent years creates a solid basis for moving forward," Putin said.

He praised Medvedev for working "thoroughly, professionally and honestly" over the last six years during what he said was a "difficult" period for Russia.

Medvedev in turn thanked Putin for his support and said his government would work towards fulfilling new national targets Putin announced following his inauguration for a fourth Kremlin term this week.

"We are able to be victorious both in war and peaceful times," Medvedev told the Duma, a day before Russia celebrates World War II victory over the Nazis with a military parade on Red Square.

Medvedev, now 52, served as president from 2008 to 2012 when Putin had served the maximum two consecutive terms permitted by the Russian constitution.

Putin then returned as president in 2012 while Medvedev became prime minister in a deal that the men said they had long agreed, disappointing those who had seen Medvedev as a more liberal figure and prompting mass street protests led by opposition politician Alexei Navalny.

Putin and Medvedev first met in their native city of Saint Petersburg where they were colleagues in the mayor's office in the 1990s.

Putin, 65, is now set to serve until 2024 and is on course to become the longest-serving Russian leader since Joseph Stalin. He won March polls with more than 76 percent of the vote.