Pakistani police say they have defused 50kg of explosives hidden in a car wired with remote-controlled detonators near the fortified farmhouse where the former president Pervez Musharraf is under house arrest.
The discovery added a new subplot to the saga of Musharraf's deepening legal woes, which have transfixed Pakistanis unaccustomed to the sight of a once all-powerful military ruler submitting to the will of judges.
"When we checked the car we found explosives," the police bomb squad constable Rehmat Ali told Reuters television. "When we unlocked one of the doors we saw a detonator cord."
Ali added that police had discovered several remote-controlled detonators rigged to the explosives, which they disarmed.
There was no immediate word from police on who they suspected might have planted the device.
Pakistan's Taliban movement, which threatened to kill Musharraf shortly before he returned to Pakistan last month after almost four years of self-imposed exile, denied any involvement in the incident.
"We would have sent suicide bombers," the Taliban spokesman Ehsanullah Ehsan said.
Musharraf made many enemies during his stint in power, notably among militant groups who felt betrayed by his decision to align Pakistan with the United States following the 11 September 2001 attacks.
Musharraf had hoped to relaunch his political career by running for a seat in the national assembly at general elections on 11 May, Pakistan's first transition between elected civilian-led governments.
Instead, election officials disqualified him from running and a court ordered he be placed under house arrest last week over allegations he unlawfully ordered the detention of judges during a showdown with the judiciary in 2007.
Police found the explosives several hours after Musharraf made his latest court appearance over separate allegations that he failed to provide adequate security to prevent the 2007 assassination of the former prime minister Benazir Bhutto.
Pakistani television broadcast video showing scores of lawyers, who have not forgiven Musharraf for the crackdown he launched on the judiciary, scuffling with supporters of the ex-president after the hearing.
Police arrested Musharraf on Friday, treating Pakistanis to the rare spectacle of a former army commander being humbled by judges in a country where the military has ruled for more than half the years since Pakistan's creation in 1947.
Musharraf's office has dismissed the allegations against him as baseless and politically motivated.
Musharraf, who seized power in a coup in a bloodless coup in 1999,ousting then PM Nawaz Sharif, resigned in 2008 and left Pakistan for residences in London and Dubai.
His legal troubles have provided a stark symbol of the changing balance of power in Pakistan, where the military still retains enormous behind-the-scenes influence but has retreated from the overt meddling and coups of the past.