A nationwide cease-fire agreement took effect in Syria on Thursday night.

Russia and the Syrian army announced the agreement earlier in the day, saying that a nation-wide cease-fire deal had been reached with opposition rebels in Syria and they would forge a path towards peace talks.

Vladimir Putin said the truce, which excludes extremist groups such as ISIS and al Qaeda affiliate al-Nusra, was set to begin at midnight local time (5 p.m. ET) and would be guaranteed by Russia and Turkey.

Reuters reported that one Free Syrian Army commander expressed optimism that the break in fighting would endure.

"This time I have confidence in its seriousness. There is new international input," Colonel Fares al-Bayoush told Reuters, though he did not share any additional insights about the international input.

Monitors and a rebel official reported clashes between insurgents and government forces along the provincial boundary between Idlib and Hama, and isolated incidents of gunfire further south less than two hours after the truce began. Warring sides appeared to have stopped firing in many other areas, however.

The Syrian army said the agreement did not include ISIS, fighters affiliated with al Qaeda's former branch the Nusra Front, or any factions linked to those jihadist groups.

A lasting cease-fire would bring an end a conflict that has killed more than quarter a million people, created more than four million refugees and caused half the country's population to be displaced.

According to the Kremlin, Putin spoke with Turkish President Recep Tayyip Erdogan and Syrian President Bashar al-Assad on Thursday shortly before the ceasefire began.

Russia is a key ally of the Assad regime, while Turkey is one of the main backers of the opposition. Several previous attempts to halt the civil war have failed but the recent warming of ties between Turkey and Russia may prove to be a game changer this time.

Putin said peace talks between Assad and the opposition would be held in Kazakhstan next month, if the cease-fire continues.

Syria's military said the cease-fire followed the "successes achieved by the armed forces," an apparent reference to the capture of rebel-held neighborhoods of Aleppo earlier this month.

Russia’s Foreign Minister Sergey Lavrov said that that President-elect Donald Trump's administration will be welcome to join the Syrian peace process once he takes office.

It comes on the heels of the Syrian army's retaking control of Aleppo, Syria's largest city, ending the opposition's four-year hold over parts of the city.

Putin said he ordered the Russian military to scale down its presence in Syria, where it has provided crucial support to Assad's forces, but will maintain a presence at both an air base in Syria's coastal province of Latakia and the naval facility in the Syrian port of Tartus.

Earlier Thursday, Turkey called on Hezbollah to withdraw its fighters from Syria. The group, which has sent thousands of fighters to support Assad, has been playing an instrumental role in Syria's civil war since 2013, mostly in areas near the border with Lebanon, the suburbs of the capital Damascus and the northern city of Aleppo.

The group is not likely to withdraw from Syria in the near future as its leader repeatedly said that their presence there is mostly to prevent attacks by extremists deep inside Lebanon.