KABUL — Afghanistan’s controversial first vice president, who has been under investigation for months on accusations of assault and sexual abuse, flew to Turkey unexpectedly late Friday for “medical tests,” according to his aides and Afghan government officials.

But human rights groups, Afghan analysts and others said they suspect that Abdurrashid Dostum, 63, an ethnic Uzbek militia leader and former army general, had flown into exile to avoid prosecution, possibly in a deal with the government. He has not been charged with any crime.

“Vice President Dostum does have a judicial case pending, but he has gone to Turkey for health tests. We pray for his health and return,” Shah Hussain Murtazavi, a spokesman for President Ashraf Ghani, told journalists Saturday afternoon.

In December, an elderly Uzbek politician named Ahmad Eschi accused Dostum on national TV of ordering his militia guards to imprison, beat and rape him. The powerful warlord claimed the charges were a political plot, but the incident put Ghani under strong foreign pressure to bring him to justice.

Since then, the attorney general’s office has been trying to investigate the case, but Dostum has refused to be questioned and has only allowed several of his guards to submit to official requests, leaving the government in an embarrassing quandary and the disgraced official stewing in his heavily guarded residence in the capital.

In private, meanwhile, Dostum’s representatives have reportedly met with presidential aides, seeking a political solution. Although estranged from Ghani, Dostum has not been removed from office and remains first in line to replace the president, who is 68 and suffers from heart problems.

At the same time, Dostum’s plight has recently inspired large rallies by Uzbek supporters in several northern provinces, where he remains a cult figure despite his reputation for abusive behavior toward both adversaries and underlings. Some have called on him to stage a revolt against the government.

“General Dostum has always been with his people, in bad and good situations. He will return to Afghanistan as soon as the tests are done,” his chief of staff, Enayat Farman, said in a Facebook post Saturday. He said that Dostum was concerned about the country’s worsening security situation. But, he added, “The people will be victorious, and the enemies will be eliminated.”

Critics on social media and in the human rights community were quick to denounce Dostum’s unannounced departure. He reportedly left late Friday in a plane sent from Turkey, where he has long historic and official ties and has fled several times previously during political tumult.

Patricia Gossman, a longtime Afghanistan researcher for the New York-based group Human Rights Watch, tweeted Saturday that the “Dostum case shows Ghani’s inability to ensure justice” and is an “example of the power strongmen wield over Afghanistan.”

Earlier this month, Afghan Attorney General Farid Hamidi said the government was continuing to pursue its investigation against Dostum. The case has been widely seen as a test of whether the Western-backed Ghani administration can bring the rule of law to Afghanistan and end the impunity of powerful ethnic leaders like Dostum.

But Ghani, who ran for president in 2014 as a modern reformer, needed the Uzbek strongman to win election and added Dostum to his ticket, despite a history that included allegedly beating an elderly businessman in Kabul in 2008 — an incident which led to police surrounding his house and Dostum flying again to exile in Turkey.

When the new assault case exploded last winter, some advisers urged Ghani to take a more traditional approach and settle the matter privately. As the stalemate dragged on, the idea was floated that Dostum could be urged to quietly leave the country, one more time.