Pakistan and Saudi Arabia have long enjoyed close relations, but Islamabad's new-found resolve for fighting the root causes of extremism has seen the Gulf state come in for rare criticism.
The two countries, both with majority Sunni Muslim populations, are bound together by shared Islamic religious ties, financial aid from oil-rich Saudi and Pakistani military assistance to the kingdom.
But a Taliban massacre at a school that killed more than 150 people in December, mostly children, has led the government to crack down on militants and talk of bringing religious seminaries under tighter control.
Now the country's media and even government ministers have begun to question whether support from Saudi Arabia for seminaries, known as madrassas, is fuelling violent extremism — bringing tension to the relationship for the first time.
Last week the Saudi embassy issued a statement saying that all its donations to seminaries had government clearance, after a minister accused the Riyadh government of creating instability across the Muslim world.
The Pakistani foreign ministry responded by saying that funding by private individuals through "informal channels" would also be scrutinised closely to try to choke off funding for terror groups.
While the statement avoided mentioning Saudi Arabia specifically, it was widely interpreted as a rebuke.
Away from the seminaries, there has also been widespread criticism of the decision to allow Saudi royals to hunt the rare houbara bustard, prized in the Middle East for its supposed aphrodisiac properties, in the southern provinces of Sindh and Baluchistan.
Officials granted permission to hunt the bird, which is on the International Union for Conservation of Nature's "red list" of threatened species, in defiance of a court order, prompting allegations that the government prized its lucrative ties to Riyadh over its own wildlife.
Badar Alam, editor of Herald magazine, a respected Pakistani current affairs monthly, said the recent wave of criticism was unprecedented.
"Saudi has vast commercial and economic interests in Pakistan. There are open questions being asked on this relationship," he said.
"Before, nobody would ask any questions in any manner. Now even the Urdu press is asking questions."
– Terror funding –
Donors in Saudi Arabia have long been accused of quietly funding terror groups sympathetic to the kingdom's hardline version of Sunni Islam.
Leaked diplomatic cables by then-US secretary of State Hillary Clinton in 2009 said Saudi Arabian donors were "the most significant source of funding to Sunni terrorist groups worldwide".
The cable cited the Taliban, Al-Qaeda and Pakistan's Sunni Muslim sectarian militants Lashkar-e-Jhangvi as examples of where funds were being channelled.
Linked to the funding is Saudi Arabia's long geostrategic struggle with Iran, the key Shiite Muslim power in the region.
Nawaz Sharif, Pakistan's current prime minister, enjoys particularly close ties with the Saudi royal family, which hosted him during his almost decade-long exile from Pakistan following his ouster by then military ruler Pevez Musharraf.
And last year the government said it had received a $1.5 billion "gift" from a friendly Muslim nation, widely thought by experts to be in fact a loan from Saudi Arabia.
But Najmuddin Sheikh, a former foreign secretary and ambassador, said the December attack on an army school in Peshawar, which left 153 people dead including 134 children, had opened the door for criticism.
"This has been triggered by Peshawar and a strong feeling that much of the terrorism that is here is being financed by outside countries," he said.
"Countries like Kuwait, UAE and Qatar must also do much more at home to curtail this."
But, he added, any efforts to cut back on foreign funding for extremist seminaries must go hand in hand with similar efforts at home.
He said this would include the state dropping its links with proxy groups that have historically been used by the military establishment to further strategic goals in Afghanistan and Indian-administered Kashmir.
"Our fund collection within Pakistan remains unimpeded. If you want more from abroad you need to do more at home," he said.
A senior government official, speaking on condition of anonymity, agreed.
"We didn't need the Saudis to radicalise us, we have geared ourselves to that," he said.
And while the current mood may be critical of Riyadh, the official said in the long run the relationship was too important and too beneficial to jeopardise.
"There is no change in policy. Both the Sharif government and the military are very much on board with Saudis. Actual policy is not likely to change," he said.