They then moved on to the French embassy, but were kept at bay by riot police using tear gas and water cannons.
The Chilean embassy, located on the first floor in the same building as the Danish mission, was the one damaged. The fire did not appear to touch the Swedish embassy located on the second floor, nor the Danish embassy on the third. Several dozen demonstrators among what state news agency Sana said was a crowd of several thousand, scaled the facade. Some climbed over the balcony of the Chilean embassy, broke in and threw furniture out.
Others on the ground used the furniture as fuel to start a fire. The flames set light to the Chilean balcony but it was not clear if they reached inside.
Initial reports said demonstrators had broken into the Danish embassy and trashed it before setting it on fire. These reports were later denied.
In Copenhagen and Oslo, the governments reacted by advising their nationals to leave Syria immediately.
Norwegian Foreign Minister Jonas Gahr Stoere said he had telephoned his Syrian counterpart, Faruq al-Shara and told him "this was completely unacceptable."
He added that Shara "had distanced himself from the attack, and he apologised."
The Swedish government said it would lodge an official complaint with the Syrian authorities, while there was no immediate reaction from Chile.
During the angry protests outside the building housing the Danish, Swedish and Chilean embassies, demonstrators ripped the three countries' coats of arms off the walls. One later triumphantly brandished the Danish crest in the air.
The protesters also threw rocks at riot police who had set up a security cordon and tried to block fire trucks from reaching the scene.
A number of them then headed towards a four-storey building housing the Norwegian embassy, one kilometre away. Riot police had set up a security cordon there and initially beat back the crowd, using batons and tear gas.
Eventually the demonstrators broke through and entered the embassy, setting fire to the second floor.
There were no reports of injuries at any of the diplomatic missions.
At least a dozen demonstrators were hurt in the clashes with police outside the Norwegian embassy and had to be hospitalised.
After the attack on the Norwegian mission, the crowd moved on to the French embassy. There security forces used tear gas and water cannons to prevent demonstrators from storming the building, AFP reporters said.
After the Danish and Norwegian missions were attacked, other protesters took to the streets denouncing the publication of the cartoons of the Prophet.
"With our souls and with our blood, we will sacrifice ourselves for the prophet," shouted several hundred marchers.
"We will not keep quiet," and "There is but one God," they also shouted.
Telephone text messages had been circulating in Damascus claiming that Danes were going to be gathering in one of Copenhagen's main squares on Saturday to burn copies of the Holy Quran. People were urged to gather at the embassy to protest.
Twelve cartoons, first published last September by the conservative Danish newspaper Jyllands-Posten, have caused an uproar in the Muslim world and set off a new cultural battle over freedom of speech and religious tolerance.
Incensed Muslims have demonstrated against Danes and other Europeans, burned Danish flags and boycotted the country's products.
In some Muslim countries, Danish ambassadors have been recalled and Westerners threatened.
There were fresh demonstrations in several cities including Ankara and London.
Around 500 students of seminaries protested in Lahore on Saturday, chanting slogans of "Down with Denmark" and "Hang the culprits.
Meanwhile, two New Zealand newspapers on Saturday reprinted the cartoons, which have appeared in newspapers in Denmark, France, Germany, Spain, Switzerland and Hungary, saying the decision was based on press freedom.
For many Muslims depicting the Prophet is forbidden and European leaders have called for restraint, expressing concern about the firestorm that has erupted over the last days.
Palestinian youths tried on Saturday to storm the European Union office in Gaza in protest over the printing.
They threw stones at the EU office, burnt tyres outside and tried to enter the compound. They clashed with security forces who intervened and arrested two youths.
The youths took down the EU flag from the building and replaced it with the Palestinian flag. They chanted slogans against Denmark and pledged to give their "blood to redeem the Prophet".
Youths also attacked Germany's nearby representative office, smashing windows with hammers and damaging the courtyard. A burned German flag was found on the floor. No staff was believed to have been in either building.
Indonesian President Susilo Bambang Yudhoyono and Malaysian Prime Minister Abdullah Ahmad Badawi called on their countries' Muslims to exercise restraint.
"The Indonesian government condemns the printing of the caricatures of the Prophet Muhammad. The insult to religious symbols have hurt the feelings of the Muslim," Yudhoyono, leader of the world's most-populous Muslim nation, said.
The Malaysian Prime Minister branded the publication of the images a "blatant disregard for Islamic sensitivities".
Turkish Foreign Minister Abdullah Gul, a European Union candidate country, repeated Ankara's call for calm and for mutual respect between Muslims and non-Muslims.
"Of course there should be freedom of the press everywhere. But without doubt, respect for our values must not be abandoned for the sake of "freedom"," Gul said in televised remarks.
Separately, protesters held another demonstration outside the Danish embassy in Ankara, laying a black wreath and vowing to boycott Danish products.
In an interview with La Repubblica daily, European Justice Commissioner Franco Frattini said the European Union could not apologise for the offence caused.
"No, it's not Europe's duty, nor do I think it is the duty of (Danish) Prime Minister Rasmussen. We don't have the power to apologise in the name of the press. That would be violating the basis of freedom of the press. If they feel it is right, it is up to the editors and the authors of the cartoons to apologise to those who feel offended."
In South Africa, a court granted a request by a Muslim group to bar publication of the cartoons.
Jordan's state prosecutor arrested the editor of a tabloid weekly which had published the cartoons. He had already been sacked by publishers of his Shihan weekly for reprinting the cartoon.