Tajikistan's president Emomali Rakhmon, who is running for re-election Sunday, led his country out of civil war in the 1990s and is tipped to become the longest-ruling head of a former Soviet state.

Largely mountainous, Rakhmon's poor and mostly agrarian country became a partner for Washington after the US invasion of neighbouring Afghanistan in 2001.

But the 68-year-old former collective farm boss has looked to Moscow --- and more recently to China -- to bolster a regime that watchdogs say is defined by corruption and rights abuses.

While describing himself as a Muslim believer, Rakhmon is seen as an opponent of rising Islamic observance in the secular republic, backing forced beard shavings, bans on hijabs and a drive to exclude "non-Tajik names" during his 28-year rule.

Born on October 5, 1952 in the southern Khatlon province, Rakhmon became an MP in 1990 after running a collective farm for more than a decade.

These beginnings have drawn comparisons with Belarusian leader Alexander Lukashenko, who is two years younger than Rakhmon and took a near-identical route to leadership.

Among the leaders of ex-Soviet states, only Kazakhstan's Nursultan Nazarbayev, who retired as president last year after 29 years in power, has ruled longer than Rakhmon.

Few would have guessed that Rakhmon would last the course when he was promoted in 1992 to chair the national assembly -- a position equivalent to head of state -- as fighting between the pro-government forces and the United Tajik Opposition (UTO) raged.

He was elected president in 1994, after the position was re-established, and re-elected in 1999, 2006 and 2013. None of these votes were endorsed by international monitors.

A 1997 agreement that ended Tajikistan's five-year civil war that claimed tens of thousands of lives allowed the UTO a proportion of government positions.

But Rakhmon gradually sidelined political competition.

In 2015, the authorities banned an Islamic opposition party, seen as a legacy of the peace deal, and began jailing its members. Several have died whilst serving their sentences.

Rakhmon was a former collective farm boss
Rakhmon was a former collective farm boss POOL / WU HONG

In Sunday's vote, Rakhmon faces four pliant candidates, while the parliament, whose upper house is chaired by his son and likely successor Rustam Emomali, is also opposition-free.

While Rakhmon's personal friend Lukashenko faces an unprecedented challenge to his rule, the Tajik leader has encountered few obstacles.

In 2016 he cemented his position further with constitutional changes that allowed him to run for office an unlimited number of times as the "leader of the nation" and "founder of peace and national unity."

In the last decade, Rakhmon's government has embarked on a number of grandiose projects, which critics say are wasteful and point to megalomania.

The capital Dushanbe hosts a flagpole that was once the tallest in the world, as well as the biggest library, teahouse and theatre in Central Asia.

Construction of the world's tallest hydroelectric dam, which could facilitate exports to Afghanistan and Pakistan, is also underway, with some making calls to change its name from Rogun to Rakhmon.

Tajik state television regularly fawns over Rakhmon and his interior minister Ramazon Rahimzoda has written poems lauding his boss.

What everyday Tajiks think of him has always been harder to gauge.

Although many credit Rakhmon for maintaining the post-war peace, they denounce corruption and nepotism and the increasingly strident attacks on Islam.

Perhaps the most damning indictment of his rule is Tajikistan's long-standing status as one of the world's most remittance-dependent countries, with hundreds of thousands of Tajik migrants toiling in Russia and elsewhere.

Lacking a voice or opportunity at home, many chose to vote with their feet.