The US and Russia have announced a breakthrough agreement on Syria that foresees an imminent nationwide ceasefire.

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

US secretary of state John Kerry said the plan could 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 tomorrow, Kerry said, coinciding with the Muslim Eid al-Adha holiday.

"Today the United States and Russia are announcing a plan which we hope will reduce violence, ease suffering and resume movement toward a negotiated peace and a political transition in Syria," Kerry said. "We are announcing an arrangement that we think has the capability of sticking, but it is dependent on people's choices."

"It has the ability to stick, provided the regime and the opposition both meet their obligations, which we - and we expect other supporting countries - will strongly encourage them to do," he added.

Kerry's 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 under UN auspices that have been stalled for weeks.

"This is just the beginning of our new relations," Lavrov said.

He said Syrian President Bashar Assad's government was informed of the accord, and was prepared to comply.

Kerry outlined several steps the government and rebels would have to take.

They must now pull back from demilitarised zones, and allow civilian traffic and humanitarian deliveries - notably into the divided city of Aleppo where as many as 500,000 people have been killed in fighting.

"If Aleppo is at peace, we believe that the prospects for a diplomatic solution will brighten," he said. "If Aleppo continues to be torn apart, the prospects for Syria and its people are grim."

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

At one point in the Geneva negotiating session, which lasted more than 13 hours, 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 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.

However getting Assad's government and rebel groups to comply with the deal may now be more difficult as fighting rages around Aleppo.

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.

Turkey, which is a leading backer of the rebels fighting to overthrow Assad, and the EU have welcomed the deal, but warned further action is needed.