ISLAMABAD (AP) — Thousands of Pakistan's hard-line Islamists dispersed peacefully after ending their protest march near Islamabad on Friday following the cancellation of a Prophet Muhammad cartoon contest sponsored by an anti-Muslim Dutch lawmaker.

The development came hours after far-right politician Geert Wilders said Thursday he had canceled the cartoon contest following death threats and concerns other people could be put at risk.

The decision prompted Khadim Hussain Rizvi, a firebrand Pakistani cleric who heads Tehreek-i-Labaik party, to end his march, which began Wednesday from the eastern city of Lahore.

Rizvi had planned to stage a sit-in to force Pakistan to sever diplomatic ties with the Netherlands over the contest.

Physical depictions of the prophet are forbidden in Islam and deeply offensive to Muslims.

Tehreek-i-Labaik spokesman Zubair Ahmed said Friday the party did not support Imran Khan to become prime minister after the July 25 elections, but his government still allowed the marchers to reach the capital.

"We have peacefully dispersed and our supporters are going back," he said.

Earlier, Foreign Minister Shah Mahmood Qureshi met with the leaders of Tehreek-i-Labaik and thanked them for calling off the march.

He said the cancellation of the contest was success of their diplomatic efforts.