By Shirazuddin Siddiqi
BBC News website
King Fahd of Saudi Arabia, who has died aged 84, leaves a significant but complex legacy for South and Central Asia, and the wider world.
The king sought to spread Wahabi Islam
The king played a key role in the war against Soviet troops in Afghanistan in the 1980s - his country's financial input was believed to be as big as the US contribution.
And he embarked on a partnership with General Zia to Islamicise Pakistan, gathering large numbers of young Muslims from different countries to become "ambassadors of faith" for the wider world.
The king's ambition was to spread Wahabi Islam - a sect that now has followers in both Pakistan and Afghanistan - around the world.
He was among the first to help fund religious schools or "madrassas" in Pakistan, some of which are now accused of links with militant groups blamed for carrying out or inspiring terror attacks in a number of countries.
Support for Taleban
The war against the Soviets gained unexpected momentum after King Fahd ascended the throne in 1982.
Saudi Arabia, under him, matched every dollar that the American administration put aside to defeat the Red Army.
King Fahd's combined religious and financial commitment inspired many in the Arab world, some of whom came together in Afghanistan to participate in the jihad (holy war) from which al-Qaeda eventually emerged.
Anti-Soviet fighters benefited from Saudi money
Hundreds of Muslim fighters travelled to Afghanistan and trained to fight against the Soviets.
The combination of unprecedented large sums of money and the increase in numbers of foreign fighters led to a rapid escalation of the war in Afghanistan in the mid-1980s which took the Soviet forces by surprise.
The USSR collapsed within a couple of years of the withdrawal in 1989.
King Fahd's foreign policies had many repercussions.
His invitation to US forces to help protect his kingdom in the early 1990s angered many of his subjects, some of whom later turned up as jihadists in Afghanistan, and are still a problem for Saudi Arabia and the world today.
Around the same time in Afghanistan, he lent support to the mujahideen, and later to the Taleban after they came to power.
Saudi Arabia was one of only three countries in the world - beside Pakistan and the United Arab Emirates - which officially recognised the Taleban regime.
His government found itself in a difficult situation over the Taleban, which Saudi-born al-Qaeda leader Osama Bin Laden, the royal family's sworn enemy, was also seen as bankrolling.
'Friend and brother'
King Fahd also lent immense economic support to Pakistan and pumped tons of free and subsidised oil into the country, which contributed to economic progress never before experienced there.
But observers say many ordinary Pakistanis were not aware of what King Fahd did for their country.
The king's significance in the region was illustrated by the manner in which Afghanistan and Pakistan both responded to his death.
Afghanistan announced three days of official mourning and Pakistan seven.
Pakistan's President, Pervez Musharraf, praised the king as a "statesman of high calibre" of the Muslim world.
Afghan President Hamid Karzai described him as a "friend and brother of the Afghan people".
He said the people of Afghanistan would continue to remember "his unstinting support during the years of jihad against the Soviets".
The Taleban, too, offered thanks for the king's support and said, had they been able, they would have sent a delegation to his funeral.
"We share the pain of the Saudi nation over this great loss," Mufti Latifullah Hakimi, who claims to speak for the Taleban, told the Afghan Islamic Press.
The complexity of King Fahd's legacy is not difficult to notice in today's world.
Afghanistan, with support from the Saudis and the West, drove the Soviets out and achieved its independence.
The same support enabled Pakistan to make huge economic progress.
And yet both countries, and the entire world, are haunted by the threat posed by Islamic fundamentalism.