The Pakistani authorities had earlier called on the army as police struggled to contain the crowd of thousands with tear gas and live rounds.
Some protesters had said they would not leave the diplomatic enclave until the US embassy was on fire.
Protests over the film, Innocence of Muslims, have claimed several lives.
It was made in the US and is said to insult the Prophet Muhammad.
Streets leading to the enclave, where most of the embassies are housed, were earlier blocked off by shipping containers in an effort to increase security.
‘Out like a light’
Television pictures showed chaotic scenes as police tried to gain control of the situation.
Protesters burned an effigy of US President Barack Obama and threw missiles at the police.
One demonstrator told reporters: “The infidel who produced the movie should be hanged, or hand over him to the Muslims. And we don’t want any (US) diplomat or embassy in Pakistan: all relations should be cut off.”
The BBC’s Aleem Maqbool in Islamabad, who did not see any evidence of the army at the scene, said the protest was “turned out like a light”.
He said it was amazing, given the strength of feeling at the the protest earlier, that the crowd left as peacefully as it did.
A demonstration in the same area on Wednesday saw around 500 protesters gather outside the gates of the enclave.
The US State Department earlier issued a warning against any non-essential travel to Pakistan.
It also “strongly urged” US citizens in Pakistan to avoid protests and large gatherings.
Anti-US sentiment has been growing since people became aware of the amateur film earlier this month.
The US Ambassador to Libya was killed in an attack on the US consulate in Benghazi, on 11 September.
Protests in countries around the world then took place.
Tensions with the West have been further inflamed by the publication by a French magazine of obscene cartoons of the Prophet Muhammad on Wednesday.
The Pakistani government has called a national holiday on Friday to enable people to demonstrate peacefully.
- Pakistan anti-film protest ends (bbc.co.uk)
- US anti-film ads on Pakistani TV (bbc.co.uk)
- Protests Over Muhammad Depictions Hit Pakistan, Afghanistan (blogs.voanews.com)
- MASSIVE PROTEST IN ISLAMABAD… Students Storm Embassy District – Police Called In (Video) (thegatewaypundit.com)
- At least 18 dead in Pakistan anti-American rioting Friday (latimesblogs.latimes.com)
- Elsewhere In The World: Thousands Gather To Violently Protest The U.S. Embassy In Response To “Innocence Of Muslims”, Obama Effigy Burned! (bossip.com)