Pervez Musharraf's Afghan policy of siding with the US in its war on terror after the 9/11 attacks while also going soft on the Taliban proved a double-edged sword for his country as the extremist group turned against him and carried out terrorist attacks inside Pakistan.
Musharraf, the 79-year-old bespectacled mustachioed four-star general of the Pakistan Army, died at the American Hospital in Dubai on Sunday, following a protracted illness.
The former military dictator of Pakistan and the architect of the Kargil War in 1999 seized power after a bloodless military coup in 1999 and remained in charge until 2008.
Musharraf's time in power was shaped by the 9/11 attacks and their aftermath. The attacks were masterminded by al-Qaeda's then leader Osama bin Laden, who the Taliban were sheltering in Afghanistan, a country that shares a long border with Pakistan.
"America was sure to react violently (after 9/11), like a wounded bear. If the perpetrator turned out to be al-Qaida, then that wounded bear would come charging straight toward us," Musharraf wrote in his autobiography titled 'In the Line of Fire'.
According to the book, the then-US Secretary of State Colin Powell told Musharraf after the 9/11 attacks that Pakistan would either be "with us or against us".
Musharraf alleged later that another US official, whom he did not name, had threatened to bomb Pakistan "back into the Stone Age" if it went against the US policy in Afghanistan.
Irrespective of the nature of US messaging, the invasion of Afghanistan might not have come at a more appropriate time for Musharraf, who after the military coup was still groping in the dark for legitimacy.
He jumped on the US bandwagon, opening Pakistan's door for the US dollars and its border for the fleeing terrorists, including those belonging to the Taliban and al-Qaeda groups.
The decision had far-reaching consequences. The extremist groups in Pakistan turned against him, and not only provided support to the Afghan terrorists but also started attacks inside the country.
Due to the local dynamics and porous border with Afghanistan, Musharraf could not stop this.
The western nations cried foul and blamed him for the "double game" but they failed to break the nexus between Pakistan and the Taliban. The latter ultimately returned to power in Afghanistan in 2021, long after Musharraf had vanished from the political scene.
Pakistan was used as a transit for NATO and US forces in Afghanistan. And Musharraf tolerated attacks launched by US forces against suspected terrorists in Pakistan's rugged border areas.
Musharraf's Afghan policy exposed the vulnerability of Pakistan to terror outfits like Tehreek-i-Taliban Pakistan (TTP) that emerged on the scene in 2007.
According to various estimates, Pakistan has suffered economic losses to the tune of more than USD 125 billion and lost over 80,000 in the US-led war on terror.
Musharraf's death coincides with the resurgence in terrorism. With the Afghan Taliban demurring to take action against the TTP, Pakistan is feeling a sense of betrayal.
The TTP has been blamed for several deadly attacks across Pakistan, including an attack on army headquarters in 2009, assaults on military bases and the 2008 bombing of the Marriott Hotel in Islamabad.
In 2012, Nobel laureate Malala Yousafzai was attacked by TTP. In 2014, the Pakistani Taliban attacked the Army Public School in the northwestern city of Peshawar, killing at least 150 people, including 131 students.
The TTP, which is believed to have close links to al-Qaeda, has threatened to target top leaders of Prime Minister Shehbaz Sharif's PML-N and Foreign Minister Bilawal Bhutto-Zardari's PPP if the ruling coalition continued to implement strict measures against the militants.
Musharraf has said in the past that under his regime, Pakistan had tried to undermine the Afghan government led by ex-president Hamid Karzai for helping "India stab Pakistan in the back".
The former military ruler said in an interview in 2015 that spies in Pakistan's Inter-Services Intelligence (ISI) had given birth to the Taliban after 2001 because the Karzai- government had an overwhelming number of non-Pashtuns and officials who were said to favour India.
Musharraf was accused of complicity in the assassination of former Pakistani prime minister Benazir Bhutto in 2007. He stepped down in 2008.
He was later charged with treason for imposing emergency rule, and fled Pakistan in 2016, spending his final years in exile in the UAE. He tried a comeback in 2012, which failed.
Musharraf's years in power have his defenders. The economy grew during his leadership, while the country was seen as strategically important.
Musharraf, who was born in New Delhi in 1943 and fled to Pakistan in 1947, was the last military dictator to rule Pakistan.
(Except for the headline, this story has not been edited by NDTV staff and is published from a syndicated feed.)
Featured Video Of The Day
Suspense Continues Over Vinesh's Medal Verdict, New Deadline Is...
Pakistan's Supreme Court Upholds Musharraf's Death Penalty A Year After His Death When Vajpayee Asked Musharraf "Yeh Aapne Kya Kiya", Recalls Ex-Diplomat Pervez Musharraf's Appeal Against Death Penalty In Court Months After His Death Vandalism At Kolkata Hospital Where Doctor Was Raped, Tear Gas Fired 150 mg Semen In Kolkata Doctor's Body, Suspect Gang-Rape: Parents To Court 2 French Rafale Jets Collide Mid-Air, Instructor, Pilot Missing Professor 'Digitally Arrested' For 12 Days By Scammers, Loses Rs 12 Lakh Independence Day 2024 Live Updates: PM Modi To Address Nation From Red Fort PM Modi To Address Nation From Red Fort On 78th Independence Day Today Track Latest News Live on NDTV.com and get news updates from India and around the world.