ISLAMABAD (Reuters) - Pakistan's former military dictator, Pervez Musharraf, was granted bail on Monday in a case related to the killing of a cleric, taking him a step closer to freedom after months under house arrest and legal wrangling over his fate.

Musharraf has been embroiled in a web of legal cases after returning to Pakistan in March from self-imposed exile to contest a May election. His arrest was unprecedented in a country where the army wields enormous power.

"The court has granted him bail," said Afshan Adil, a member of Musharraf's legal team, told reporters.

Musharraf has already been granted bail in two other cases but has not publicly said anything about wanting to leave Pakistan. He is currently under house arrest in a villa on the outskirts of Islamabad.

"Musharraf will not leave the country and will face all the cases," Adil said. "God willing, Musharraf will be acquitted in this case."

Musharraf, then head of the army, took power in a 1999 coup but was ousted by popular protests led by the country's judiciary. He went into exile in 2008.

(Reporting by Syed Raza Hassan; Writing by Maria Golovnina; Editing by Ron Popeski)