WHEN a video of Emomali Rakhmon singing and dancing at his son’s wedding appeared online recently, his government might have used it to celebrate the human side of Tajikistan’s president. Instead, it blocked YouTube and began questioning wedding photographers.

It was not just that Mr Rakhmon was out of tune. As a presidential election approaches this autumn, the strongman, in his 21st year in power, looks increasingly out of touch. For the West, this raises the spectre of instability just across the porous border from Afghanistan. Tajikistan is already a transit route for small quantities of NATO equipment being withdrawn from Afghanistan. It is also an important backup route should one of the West’s other volatile partners in the region prove unreliable.

Tajikistan has never held an election judged fair by credible observers. But this year’s vendetta against the government’s critics has been especially vicious. In March one of them vanished without a trace. In April an Islamic opposition figure was brutally beaten. In May Zaid Saidov, a former industry minister who is now in business, was arrested on an eight-year-old corruption charge, after launching a political party.

Now he is being defamed in the press and held with limited access to his lawyer. His party colleagues, some of Tajikistan’s best minds, are being harassed: warned to watch for falling bricks. The death threats, from anonymous callers and affable agents of the spy service (still known, unaffectionately, as the KGB), extend to their children. “It hasn’t been this bad in the 20 years of independence,” says Nuriddin Karshibaev, head of a press-freedom lobby, who sees the Saidov case as a warning to the middle class to shun politics.

Mr Rakhmon likes to prove his pluralist credentials by pointing to the opposition Islamic Renaissance Party and a few critical newspapers. But the party has been defanged by stolen elections, threats and violent attacks on its leaders. In April, when it tried to hold an international conference, the regime stopped issuing visas at the airport until the meetings were over.

Meanwhile, state television dutifully follows Mr Rakhmon through tedious ceremonies where flag-waving children read poems in his honour. Mr Rakhmon has one saving grace: helping end the civil war that killed between 50,000 and 100,000 in the 1990s (the population is now nearly 8m). Tajiks have fared better in Tajikistan than their ethnic kin in Afghanistan.

Yet the president’s reputation as a peacemaker may no longer be enough. The post-war generation cannot find jobs. The economy is held hostage by the president’s family, with its penchant for seizing successful businesses. As a Western diplomat sums it up: “This is a feudal system where the elites are stuffing their pockets while they still can.”

Mr Rakhmon seems to have one eye on his rocky ties with Russia. Conscious of Russia’s history of meddling in its former Central Asian satrapies, he fears it might support an alternative, such as Mr Saidov. The Kremlin is unhappy with Mr Rakhmon, who has been stalling on extending the lease for Russia’s largest non-naval military base abroad. Several other critics live in Russia, nagging Mr Rakhmon over satellite television and the internet.

Russia has another powerful lever. At least 1m Tajiks work there, including, by some counts, half of Tajikistan’s working-age men. Their remittances add up to the equivalent of almost half of GDP. Mr Rakhmon knows that, if Russia loses patience, a few planeloads of deported Tajik migrants would wreak havoc in the capital, Dushanbe.