A Pakistan court on Monday granted bail to former military ruler Pervez Musharraf over a deadly raid on a radical mosque, bringing closer his possible release after more than six months of house arrest.
The ruling by an Islamabad district court means the ex-general 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 Islamabad, where he has been under house arrest since April, because of serious threats to his life.
Judge Wajid Ali approved bail on condition Musharraf pays bonds totalling 200,000 rupees ($2,000). The trial is due to start on November 11.
Defence lawyer Afshan Adil told AFP the money would be paid on Tuesday, but rejected rumours that have circulated in recent months that Musharraf would try to leave Pakistan.
"He is not going abroad and will stay in the country," she said.
Musharraf's name is currently on the interior ministry's "exit control list", meaning he cannot leave Pakistan without the approval of the government.
Musharraf was arrested last month over the 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.
The order to the army to storm the Red Mosque, where armed radicals had holed up just a stone's throw from the parliament building, took Musharraf to the top of the Taliban hit list.
The operation left more than 100 people dead and unleashed a wave of Islamist violence that rocks Pakistan to this day.
Tariq Asad, a lawyer for the Red Mosque, condemned the bail ruling and said an appeal would be launched in the high court.
Musharraf's aides have said the charges against him are trumped up and politically motivated and his official spokesman welcomed Monday's ruling.
"We are confident that eventually domestic and international push-back will compel Prime Minister Nawaz Sharif to cease in his tracks and the allegations filed against former president Musharraf in the Red Mosque matter will be withdrawn," Raza Bokhari said in a statement.
Former commando Musharraf 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 ousted from power in 1999 -- and was hit with a series of criminal cases dating back to his rule.
Musharraf has faced charges over Bhutto's murder at an election rally in 2007, the death of a Baluch rebel leader in 2006 and the suspension of judges in 2007.
In April he was put under house arrest, an unprecedented move in a country ruled for more than half of its life by the military. The decision was seen by many as a challenge to the armed forces' power.
Since Sharif won the election there have been repeated rumours that a deal would be reached to allow Musharraf to leave Pakistan before his trials were completed.
One theory was that he might be allowed to visit his sick elderly mother in Dubai on compassionate grounds, but aides have said repeatedly that he is determined to face justice and clear his name.
The ex-ruler has been living in part of his 1,100 square metre (12,000 square foot) house, declared a "sub-jail" under the auspices of a prison in Rawalpindi. He is guarded by some 300 police, paramilitaries and marksmen.
Reports have claimed he is enjoying a comfortable life in detention. He has even had the services of his personal cook because of his fears of being poisoned.
The Taliban have threatened to kill Musharraf, who as president allied Pakistan with Washington in the US "war on terror" in the wake of the 9/11 attacks.