The Syrian government and opposition groups have given qualified acceptance to a proposed truce in the country's devastating civil war.

The government said it accepts the ceasefire, but added that operations will continue against the Islamic State group and al Qaida's branch in Syria.

A Foreign Ministry statement also said government forces will have the right to respond to any violation by insurgents.

The official Syrian announcement came a day after the US and Russia agreed a ceasefire that will take effect on Saturday.

The main umbrella group for Syrian opposition and rebel groups said it "agrees to a temporary truce" as long as the main opposition demands are met.

The High Negotiations Committee said in a statement issued after a meeting in Saudi Arabia late on Monday that it "has given its acceptance of international efforts for a cessation of hostilities in Syria".

The HNC said "acceptance of the truce is conditional" to the Syrian government ending its siege of 18 rebel-held areas, releasing detainees and the end of aerial and artillery bombardment.

Indirect peace talks between the Syrian government and HNC collapsed on February 3 because of a large-scale government offensive.

The deal came after the US and Russia, backing opposing sides in the conflict, said they had finalised the details of a "cessation of hostilities" between President Bashar Assad's government and armed opposition groups after five years of violence that has killed more than 250,000 people.

The truce will not cover the Islamic State group, the al Qaida-linked Nusra Front and any other militias designated as terrorist organisations by the UN Security Council.

Where in Syria the fighting must stop and where counter-terrorism operations can continue must still be addressed, and the five-page plan released by the US State Department leaves open how breaches of the ceasefire will be identified or punished.

The announcement came after presidents Barack Obama and Vladimir Putin spoke by telephone on Monday, capping weeks of intense diplomacy to stem the violence so Mr Assad's government and "moderate" rebel forces might return to peace talks in Geneva.

Turkey's deputy prime minister said his country supports the ceasefire agreement but suggested that its military could continue firing on Syrian Kurdish groups in Syria if their militia "attack" Turkey.

Turkey has been shelling US-backed Syrian Kurdish militia positions in Syria, maintaining that it is responding to attacks or provocations.

Numan Kurtulmus also said that while Turkey welcomes the provisional truce for Syria, it has "reservations and fears" about possible continued Russian air strikes on civilians.

Turkey's prime minister accused Russia and Syria, along with Islamic State militants and US-backed Syrian Kurdish militia, of attempting to form a "terror belt" along its border with Syria and said his country will not let it happen.

In a weekly address to legislators from his ruling party, Ahmet Davutoglu said the aim is to establish a terror "structure" - made up of IS and the US-backed Syrian Kurdish militia group YPG - in Syria's north.

Turkey considers the YPG a terrorist organisation because of its links to Turkey's outlawed Kurdish rebels.

"Turkey is aware of these games aiming to make Turkey a neighbour with a terror structure and will not allow it," Mr Davutoglu said.

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.