The former military ruler of Pakistan, Pervez Musharraf, has fled a court in Islamabad after judges rescinded his bail and ordered his arrest.

Musharraf arrived at the High Court today for a bail hearing over charges stemming from 2007 during his time as Pakistan's leader.

He is accused of treason after imposing emergency rule and detaining more than 60 of the nation's judges, including chief justice Ifthikar Chaudhry.

Musharraf had been granted preliminary bail on the charges before he returned from exile last month, but today that bail was cancelled and his immediate arrest was ordered.

Accompanied by a heavy security detail, Musharraf fled from the court complex straight after the ruling.

It comes soon after Musharraf was barred from contesting in Pakistan's elections due in May.

He returned to Pakistan on March 24 after four years in self-imposed exile.

A spokesman for Musharraf's All Pakistan Muslim League said his supporters had been taken aback by the arrest order, after the same court last week granted him bail.

Musharraf will appeal in the country's highest court on Thursday against the order for his arrest, a party spokesman said.

ABC/AFP