Tripoli, Libya (CNN) -- Russian President Dmitry Medvedev has joined American and other European leaders in calling for Moammar Gadhafi to step down from power, a shift that appears to indicate a closing diplomatic window for the longtime Libyan strongman.

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.

Libya: What you need to know

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.

U.S. President Barack Obama, who had an extended private meeting with Medvedev while in France, insisted Friday that "the U.N. mandate of civilian protection cannot be accomplished when Gadhafi remains in Libya directing his forces in acts of aggression against the Libyan people."

"We are joined in resolve to finish the job," he declared.

A spokesman for Libya's transitional government said Gadhafi must leave before the opposition could consider negotiations or a cease-fire.

"There is no more room for him in or near Libya," said Jalal el-Gallal, a spokesman for the National Transitional Council.

NATO member Spain said Thursday that Libya had sent a message to Madrid and other European capitals, listing "a series of proposals that could lead to a cease-fire," but the allies have rebuffed earlier Libyan proposals for an end to the fighting.

While Gadhafi has been unable to come to terms with NATO demands, there may also be a growing rift between the NATO allies and the Libyan rebels over the nature of a post-Gadhafi regime.

Gadhafi's purported wife rips NATO

French President Nicolas Sarkozy indicated Thursday that any future Libyan government may include senior members of Gadhafi's regime so long as those individuals do not have "blood on their hands."

El-Gallal responded to Sarkozy by declaring Friday that it "is only up to the Libyan people" to decide "who will remain" in government and who will not.

Intense fighting, meanwhile, continued on the ground in Libya, with at least 10 people killed and over 40 injured during clashes that occurred Friday in Dafniya, outside the hotly contested coastal city of Misrata.

NATO warplanes bombed the Tripoli area late Thursday, with a tribal site near the capital the target of the latest attacks, a Libyan official said.

Five explosions, most large enough to shake buildings some distance away, struck Tripoli shortly before midnight. The Libyan official, who spoke on condition of anonymity, said the target was the tribal compound at Bab Al-Azizya, about 2 kilometers (1.3 miles) from the center of Tripoli.

CNN could not independently confirm the report.

The site is a former military base now used to welcome tribal visitors to Tripoli, offering them guest houses during their stay, the official said. It has been used as a center for people volunteering to support Libyan authorities since the revolt against Gadhafi erupted in February.

CNN's Maxim Tkachenko, Amir Ahmed, Ben Wedeman and Alan Silverleib contributed to this report.