Russia's plan for "de-escalation" zones was backed by Iran at talks in Kazakhstan. Both countries support Syrian president Bashar al-Assad.
Turkey, which supports rebel groups, also agreed to act as a guarantor.
But some delegates from the rebel forces angrily rejected the plan.
As the three countries were invited to sign the document on Thursday in the Kazakh capital, Astana, rebel delegates angrily shouted that they did not accept it and walked out.
Reporters at the talks said the rebels were unhappy about Iran's involvement in the deal as a guarantor.
The US also expressed concern over Iran, saying the country had "only contributed to the violence, not stopped it".
The Syrian government is not a signatory, but its state news agency said it supported the plan.
The talks were meant to shore up an oft-violated ceasefire which was originally agreed in December.
A partial cessation of hostilities was declared at the end of last year, but violence has continued on several fronts.
Under the Russian plan, safe zones would be established in rebel-held territory in the north-western province of Idlib, in parts of Homs province in the centre, in the south, and in the opposition enclave of Eastern Ghouta near Damascus, the AFP news agency reported.
Syrian and Russian warplanes would stop bombing rebel positions while opposition groups would halt attacks inside the "de-escalation zones".
The objective is to "put an immediate end to the violence" and "provide the conditions for the safe, voluntary return of refugees" in addition to the speedy provision of relief supplies and medical aid.
The safe zones would remain in place for six months, the Kremlin has said.
They would be surrounded by checkpoints manned by rebels and government troops, and foreign troops could also be deployed in observer roles, according to AFP.
The UN's envoy for Syria, Staffan de Mistura, called the agreement a step in the right direction.
Syria's envoy to the UN Bashar al-Jaafari said he hoped Russia and Iran would discuss the plan's details with the Syrian government as soon as possible.
Syria's war has claimed more than 300,000 lives since it erupted in 2011.
Photo: Rebel delegates angrily refused to join the signing, before storming out.