Moscow has been a strong critic of the NATO-led mission in Libya, arguing that the scope of the organization's air campaign against Gadhafi's forces far exceeds the civilian protection mandate approved by the U.N. Security Council.
Medvedev's call for Gadhafi to step aside came at the end of the Group of Eight summit in Deauville, France, on Friday. The G8 includes the United States, the United Kingdom, France, Canada, Japan, Germany, Italy and Russia.
The G8 leaders also issued a written statement Friday expressing support for the democratic uprisings in the Middle East and North Africa.
The summit leaders agree that "the regime of Gadhafi has lost its legitimacy and he must leave," Medvedev said, according to Russia's state-run RIA Novosti news agency. "This was decided unanimously."
His statement came on the heels of a request from the other G8 leaders to have the Russian leader mediate a settlement.
Earlier, Gadhafi's government also called for a Russian mediation, a sign that the Libyan leader may be searching for a way to bring about an end to the months-long war.
Libyan Prime Minister Al-Baghdadi Ali al-Mahmudi asked for help in achieving a cease-fire and starting talks without preconditions, according to a statement posted late Thursday by the Russian Foreign Ministry.
During that conversation, Foreign Minister Sergei Lavrov said Libya would have to comply with the Security Council mandate and stop any action that would cause harm to civilians, the statement said.
Libya is widely believed to have sought Russia's assistance because Moscow has consistently been a staunch critic of the NATO-led bombing campaign since that effort began in March.
On Wednesday, the Russian Foreign Ministry called NATO's recent bombing of certain Tripoli targets a "flagrant deviation" from U.N. Security Council resolution 1973.
That resolution authorizes all means necessary, short of occupying forces, to enforce a no-fly zone and protect Libyan civilians from attacks by forces loyal to Gadhafi.
Russia, a permanent member of the Security Council, abstained from the vote on the resolution.