The United States and Russia have agreed to push both sides in Syria to find an end to the bloodshed, offering to hold an international conference in search of peace.

In talks which stretched late into the night, US Secretary of State John Kerry met first for more than two hours with President Vladimir Putin on Tuesday and then for a further three with Foreign Minister Sergei Lavrov.

"We agreed that Russia and the United States will encourage both the Syria government and opposition groups to find a political solution," Lavrov told reporters at a concluding news conference that ended after midnight.

Hopefully by the end of May the two ministers working together could convene an international conference to build on the Geneva accord agreed by world powers last June for a peaceful solution in Syria, they said.

Al Jazeera's James Bays, reporting from the UN headquarters in New York, said that the meeting between Kerry and Lavrov was significant because for the first time both countries were on the same page with regards to the political solution for Syria.

But he said they have not yet resolved the fate of President Bashar al-Assad.

Geneva agreement

One such solution is the Geneva communique. The agreement, which was reached by world powers on June 30, set out a path towards a transitional government.

The accord was never implemented because the temporary ceasefire for which it also called was never put in place.

"We believe that the Geneva communique is the important track to end the bloodshed in Syria," Kerry said, describing the agreement as a roadmap to a "new Syria".

During his meeting with Putin, Kerry said: "The United States believes that we share some very significant common interests with respect to Syria - stability in the region, not having extremists creating problems throughout the region and elsewhere."

In response, Putin said his government has agreed "to cooperate in maintaining the stability" in Syria and make sure the country does not descend into further violence, Al Jazeera's David Chater, reporting from Moscow, said.

He also reported that Putin announced that he will hold separate one-on-one talks with President Barack Obama at the G-8 Summit in Northern Island on June 16 and 17.

Both the US and Russia endorsed a plan for a political solution for Syria last June but have differed over how to implement it.

Kerry said President Obama also believes Russia and the US could cooperate "significantly" on issues including North Korea, Iran and economic ties, which both sides said have not lived up to their potential.

Kerry's visit is part of an effort to improve relations between Russia and the US, which have been strained by disagreements over issues including human rights and Syria since Putin's return to the Kremlin a year ago.