The plot to attack Sharif at his sprawling farmhouse at Raiwind on the outskirts of Lahore was uncovered by a joint investigation team of police and intelligence officials which was probing the abduction of former premier Yousuf Raza Gilani's son Ali Haider during the election campaign in May.
The team traced a North Waziristan-based militant group that was active in Lahore and plotting to target Sharif with suicide bombers, according to an intelligence report.
During a raid in Multan district, 400 km from Lahore, to trace Gilani's son, security agencies arrested two suspects who belonged to Tehrik-e-Taliban Pakistan factions led by commanders Matiur Rehman and Muhammad Yasin.
These suspects divulged the plan to attempt a suicide attack on Sharif at his Raiwind residence. The suspects also revealed the name of Fahim Meo, a resident of Raiwind who was described by officials as a "prime facilitator" of the planned attack.
A team of investigators stayed in Raiwind for a week and arrested Meo. Acting on information provided by him, investigators arrested another suspect identified as Usman alias Saifullah Mehmood Iqbal, also a resident of Raiwind.
Investigators said Usman owned land adjacent to Sharif's palatial farmhouse and had direct links with Taliban militants based in Bannu and North Waziristan.
The security agencies also arrested a group of four would-be suicide bombers from North Waziristan while they were travelling from Bannu to Lahore.
The threat to Sharif and his younger brother, Punjab Chief Minister Shahbaz Sharif, was so great that they stopped using the usual route leading to the Raiwind farmhouse on the advice of security agencies.