The US and Russia have announced a breakthrough agreement on Syria that foresees a nationwide ceasefire starting early next week.

The ceasefire will be followed by an unlikely new military partnership between the rival governments targeting Islamic State and al Qaida.

At a joint news conference after a marathon day of negotiations, US secretary of state John Kerry said the plan can reduce violence in Syria and lead to a long-sought political transition, ending more than five years of bloodshed.

He called the deal a potential "turning point" in the conflict, if implemented by Syria's Russian-backed government and US-supported rebel groups.

The ceasefire begins at sundown Monday, Mr Kerry said, coinciding with the Muslim Eid al-Adha holiday.

His negotiating partner, Russian foreign minister Sergey Lavrov, confirmed the agreement and said it could help expand the counter-terrorism fight and aid deliveries to Syrian civilians.

He said Syrian president Bashar Assad's government is prepared to comply with the arrangement.

The deal ends months of frenetic diplomacy that included four meetings between Mr Kerry and Mr Lavrov since August 26.

The arrangement hinges on Moscow pressuring Assad's government to halt all offensive operations against Syria's armed opposition and civilian areas. Washington must persuade "moderate" rebels to break ranks with the Nusra Front, al Qaida's Syria affiliate, and other extremist groups.

Both sides have failed to deliver their ends of the bargain over several previous truces, but the new arrangement goes further by promising a new US-Russian counter-terrorism alliance, only a year after President Barack Obama chastised Russia for a military intervention that US officials said was mainly designed to keep Assad in power and target more moderate anti-Assad forces.

The deal includes intelligence-sharing and targeting co-ordination, a level of US-Russian interaction that has upset several leading national security officials in Washington, including defence secretary Ash Carter and National Intelligence director James Clapper. The joint military work would only begin after several days of adherence to the new ceasefire.

Mr Kerry appeared at the news conference after several hours of internal US discussions.

At one point, Mr Lavrov said he was considering "calling it a day" on talks, expressing frustration with what he described as an hours-long wait for a US response. He then presented journalists with several boxes of pizza, saying: "This is from the US delegation," and two bottles of vodka, adding: "This is from the Russian delegation."

The Geneva negotiating session, which lasted more than 13 hours, underscored the complexity of a conflict that includes myriad militant groups, shifting alliances and the rival interests of the US and Russia, Saudi Arabia and Iran, and Turkey and the Kurds.

Getting Assad's government and rebel groups to comply with the deal may now be more difficult as fighting rages around the divided city of Aleppo, Syria's most populous and the new focus of a war that has killed as many as 500,000 people.

Assad's government appeared to tighten its siege of the former Syrian commercial hub in the last few days, seizing several key transit points. Forty days of fighting in Aleppo has killed nearly 700 civilians, including 160 children, according to a Syrian human rights group. Volunteer first responders said they pulled the bodies of nine people, including four children, from rubble following air raids on Friday on a rebel-held area.

Syria's conflict has also chased millions of people from their homes, contributing to Europe's worst refugee crisis since the Second World War. Amid the chaos of fighting between Syria's government and rebels, the Islamic State group has emerged as a global terror threat.

Sign up to our free newsletters

Get the best updates straight to your inbox:
Please select at least one mailing list.

You can unsubscribe at any time by clicking the link in the footer of our emails. We use Mailchimp as our marketing platform. By subscribing, you acknowledge that your information will be transferred to Mailchimp for processing.