To much of the world, the Aga Khan is famous as a celebrity royal, with a jetsetting lifestyle, a personal fortune estimated by Forbes at about $800m - including a $150m yacht - and Rita Hayworth as a stepmother.

But to the small Pamiri minority of Tajikistan, he is their spiritual leader and a direct descendent of the Prophet Mohammed. And when fighting broke out last year in the Pamiris' biggest town, it thrust the Aga Khan into an awkward political dispute: between his benighted followers in Tajikistan who feel that the government treats them all as enemies, and Tajikistan's autocratic president on whose permission the Aga Khan depends to remain in contact with his flock.

The Pamiris of Tajikistan are among the world's 15 million Ismailis, a sect of Shia Islam that also has a large numbers of adherents in Afghanistan and Pakistan. The Pamir Mountains of Tajikistan have been a centre of Ismailism for at least a millennium, and today residents of eastern Tajikistan are overwhelmingly Ismailis. During the Soviet era they were cut off from the world Ismaili community, but the Aga Khan's first visit in 1995 to a rapturous reception was one of the landmark events of the region's history.

In the two decades since Tajikistan gained independence, the Aga Khan Development Network (AKDN) - his aid organisation - has become the dominant force in the economy of the Pamirs, the most remote part of an already remote country. With a staff of 3,500, the foundation is the largest employer in the region and signs of the Aga Khan's largesse are ubiquitous in the Pamirs: from rural schools and health clinics, to a new university and park in the centre of the main city of Khorog, where neat lawns and tastefully modern wooden playground equipment evoke Scandinavia more than the remote mountains of Central Asia.

Tajikistan's central government has long had an ambivalent attitude towards the Aga Khan's presence in the Pamirs. Embarking on independence as the former Soviet Union's poorest republic, then set further back by a bloody civil war in the 1990s, for most of its independent history, Tajikistan has barely been able to provide services to its people.

So on the one hand, it was relieved to not have to take responsibility for the Pamirs. But as the central government in Dushanbe has slowly consolidated its authority, it has come to resent the effective autonomy that the region - officially known as the Gorno Badakhshan Autonomous Region, and commonly referred to by its Russian acronym GBAO - has gained. A 2008 US diplomatic cable released by WikiLeaks reported that "the Aga Khan Development Network is making GBAO an example of liberal economic development and better education, but struggles continually to get buy-in from a suspicious government most concerned with control".

The Pamir's 'commanders'

Tajik President Emomali Rahmon tried to capitalise on the Aga Khan's popularity while simultaneously undercutting him: in his political rhetoric to the Pamiris, Rahmon emphasised his role in allowing the Aga Khan to return and operate in the region.

The central government's worries about control in the Pamirs were compounded by the strong authority of a handful of men known in Khorog simply as "the commanders". While the Aga Khan and his foundation were fulfilling GBAO's spiritual and economic needs, the "commanders" were tending to the region's security. Former civil war leaders who had been given some local authority as a result of the peace agreement that ended the war in 1997, the commanders operated like mafia bosses: leading organised crime operations while also protecting Pamiris from the predations of the central government. As Ismailis, they are followers of the Aga Khan - though they are unaffiliated with him. As with the Aga Khan, as the central government gained power it sought to rein in the commanders' authority.

This all came to a head on July 24, when a high-ranking security officer was killed near Khorog, and the government - on the pretext of catching the commanders, whom the government charged with the murder - carried out a military operation against the town. The scale of the operation - which used helicopters, mortars and dozens of snipers posted on the steep mountains enveloping the town - made clear that the government's goal was not just to capture the commanders but also to send a message that it intended to rein in the Pamiris' autonomy.

But the operation backfired - not only did it fail to capture any of the commanders, but it also quickly turned the town against the government and only strengthened support for the commanders. Many ordinary citizens took up arms and fought the government soldiers.

During the fighting, the Aga Khan and his foundation played a key role in brokering a ceasefire, and it was his moral authority that convinced the aggrieved residents of Khorog to give up the fight. When I visited Khorog earlier this summer, over and over I heard the same refrain from residents: "We only gave up our guns because the Imam asked us to," they said, using the Aga Khan's honorific.

And about a month after the ceasefire, one of the commanders was killed under mysterious circumstances. At a rally protesting the death - which townspeople blamed on the government - the local head of the Aga Khan Development Network, Yodgor Faizov, made an uncharacteristically blunt statement criticising the government.

"Imomnazar Imomnazarov [the commander] was a real man who followed the command of the Aga Khan and laid down his arms," Faizov said. "He died like a real man. He could have rallied people around himself and armed them, but he did not. Today we can be proud that the people of Badakhshan after July 24 did all that was asked of them. We complied with all the authorities' requirements. From now on, the people have every right to demand that troops be withdrawn; the people will decide their own fate. Our young people will themselves bring order to the city."

That helped reduce tensions again. But since then, many in Khorog have begun to criticise the Aga Khan and his organisation for becoming co-opted by the government and for being too reluctant to enter politics. Faizov's apparently forceful statement, they say, was in fact emblematic of a carefully calibrated policy to get the Pamiris to stop protesting while doing nothing to change the conditions underlying the Pamiris' grievances.

A depoliticised elite

Faisal Devji, probably the world's most prominent Ismaili intellectual and director of the Asian Studies Centre at St Antony’s College, Oxford University, criticised the Aga Khan Development Network's role in a much-discussed article published last fall. The organisation, Devji argued, is too dependent on the government for its presence in the country, and has created a depoliticised Pamiri elite that is unable to deal with the serious challenges facing their society.

"[T]his silence by the 'neutral' institutions of a foreign-funded civil society works only to prevent a resolution to the problem brought to light by the violence this summer," he wrote. He also quoted a letter written by a number of Pamiris to the Aga Khan complaining of the "neutral" approach taken by the AKDN in Khorog. "We are confused by their response and are at a loss - whom can we turn to in such a dire situation that affects the lives and securities of all jamati members?"

One fighter in Khorog, when I asked him about the role of the Aga Khan and his organisation in the town's conflict, paused. "They tried," he said, clearly reluctant to criticise his spiritual leader. But he went on to point out that, had an organisation such as the United Nations or the Organisation for Security and Cooperation in Europe brokered the ceasefire, then the government would have faced some consequences for breaking the ceasefire (as it seemed to do with the killing of Imomnazarov). But Rahmon, he argued, cannot be intimidated by the Aga Khan. I heard other complaints that the foundation discouraged people from marking the one-year anniversary of the Khorog fighting this summer, trying to sweep it under the rug.

Meanwhile, the sense of cultural estrangement between the Pamiris and the rest of Tajikistan has sharpened. While the cultural differences between Pamiris and other Tajiks had not been previously very salient, in the past year they have taken on new meaning. Pamiris told me they now prefer not to speak Tajik, but rather Russian or their own Pamiri languages (related to, but not mutually intelligible with, Tajik). I heard allegations from intellectuals in Dushanbe that the Aga Khan had ambitions of forming his own state, and a state-run think tank recently accused unnamed "certain forces" of trying to create a "Great Badakhshan" from parts of Tajikistan and Afghanistan.

Both in Dushanbe and Khorog, the expectation is that the government will some day soon try to finish what it started and launch another military operation. Khorog residents have vowed to fight back even harder this time. If fighting starts up again, the expectations of the Aga Khan from his followers will no doubt rise - and silence may no longer be an option.

Reporting for this story was made possible by a grant from the Pulitzer Center on Crisis Reporting.