Gul headed Pakistan's Inter-Services Intelligence (ISI) agency between 1987-89 during the final years of the Soviet occupation of neighbouring Afghanistan. But in retirement he was still seen as reflecting the mindset of Pakistan's powerful military establishment and intelligence agency.
Gul died late Saturday at the Combined Military Hospital in the scenic hill resort of Murree north of Islamabad after suffering a brain haemorrhage, relatives said. Prime Minister Nawaz Sharif sent condolences to his family.
Following the Soviet withdrawal from Afghanistan in 1989, the country slid into anarchy. Taliban fighters trained in Pakistan gradually prised control from the Northern Alliance of commander Ahmad Shah Massoud, a national hero.
During this period, Gul maintained contacts with both sides in an unofficial role as mediator. mGul remained in the limelight after leaving the military and was popular among hardline Islamist groups for his strong views about Pakistan's arch-rival India and the United States.
India viewed him with deep suspicion for his alleged links to Kashmiri militants fighting New Delhi's rule. Washington worked with him during the 1980s but later lobbied for his inclusion on a UN list of international terrorists.
During an interview with AFP in June last year, the stridently anti-American Gul had said war would continue if Afghanistan signed a security pact allowing some 10,000 US-led troops to remain in the country in non-combat roles until 2016.
Gul also recalled his last visit to Afghanistan in August 2001, when he was chief guest at the final parade organised by the Taliban government. mThe administration was toppled by a US-led invasion later that year after failing to hand over Al-Qaeda chief Osama bin Laden following the 9/11 attacks.
"Fear is no policy. Surrender is no option," reads the home page of his website generalhamidgul.com.pk, which depicts Pakistan's green and white national standard along with Gul's photo in army uniform. mHe was frequently quoted by both local and international media on issues related to Afghanistan and India.