U.S. Ambassador to Syria Robert Ford was on his way to meet an opposition figure, when government supporters threw stones, eggs and tomatoes at his convoy.
Veteran politician Hassan Abdul Azim said about 100 protesters tried to get into his office as Mr Ford arrived and then surrounded it. Mr Ford, who has been accused of inciting protests, was trapped inside the building for at least two hours.
Meanwhile, Syria has accused the US of inciting violence against its military.
"Recent statements from American administration officials... clearly indicate that the United States is involved in encouraging armed groups to practice violence against the Syrian Arab Army," a foreign ministry statement said.
Abdul-Azim told the AP that the pro-regime protesters tried to break a lock to get into his offices, but eventually Syrian forces were sent to disperse the crowd.
"Now that security forces are here, I believe his life is not in danger," Abdul-Azim told the AP. The embassy told CNN that Ford was safe.
Ford has become an interesting figure in Syria in part because so little official information is available about the unrest in the country. In July, he and French ambassadors took an unauthorized trip to the city of Hama, which has been at the epicenter of opposition protests. That trip led to attacks on the French and U.S. embassies in Damascus, which the United States blamed on Bashar Assad's regime. Since then, Ford has taken the unusual step of issuing strongly-worded condemnations of the Assad regime on the embassy's Facebook page.
On more than one occasion, he has refuted the government's claims that it is firing on protesters because security forces have been killed. In one Facebook note from early September he wrote:
Some Syrian security service members have been killed. Some want the United States to acknowledge it; well, I'm the American ambassador, and I just did. But the number of security service members killed is far, far lower than the number of unarmed civilians killed. No one in the international community accepts the justification from the Syrian government that those security service members' deaths justify the daily killings, beatings, extrajudicial detentions, torture and harassment of unarmed civilian protesters. I entirely agree with the group of Muslim scholars in Aleppo who says that the Syrian government, which has a clear preponderance of arms and force, bears the responsibility for the violence.