A Pakistan court has granted bail to Pervez Musharraf, the former military ruler, over a deadly raid on a mosque, bringing closer his possible release after more than six months of house arrest.

The ruling by an Islamabad district court on Monday means Musharraf is on bail in all the cases brought against him since his return to Pakistan from self-imposed exile, including one relating to the assassination of former prime minister Benazir Bhutto.

But the 70-year-old is likely to remain under heavy guard at his villa on the edge of the capital, Islamabad, where he has been under house arrest since April, because of serious threats to his life.

His name is currently on the Interior Ministry's "exit control list", which means he cannot leave Pakistan without the approval of the government.

Judge Wajid Ali approved bail on condition Musharraf pay bonds totalling $2,000.

Musharraf was arrested last month over the deadly 2007 raid on the Red Mosque in Islamabad, just a day after he was given bail in the last of three major cases against him dating back to his 1999-2008 rule.

Musharraf, a former 
commando, returned to Pakistan in March to run in the May general election, vowing to "save" the country from economic collapse and militancy.

But he was barred from standing in the election, won convincingly by Prime Minister Nawaz Sharif - the man he removed from power in 1999 - and was hit with a series of criminal cases dating back to his rule.

Source: Al Jazeera and agencies