Former Pakistani military ruler Pervez Musharraf has sped away from a court in the country's capital to avoid arrest after his bail was revoked, police have said.

Officers were deployed at the high court in Islamabad on Thursday, but Musharraf's security team rushed him out of the building and drove him away before he could be detained.

Ali Asghar, a police officer at the scene, said the court rejected bail in a case related to Musharraf's decision to suspend the constitution and declare a state of emergency in 2007.

A spokeswoman for Musharraf, Saima Ali Dada, said his legal team was considering the next move.