ISLAMABAD, Pakistan — Pakistan’s powerful military returned to the political arena on Thursday, agreeing to mediate between the government and protesters who have camped out in the capital for two weeks demanding the resignation of Prime Minister Nawaz Sharif over alleged voting fraud.
Cricketer-turned-politician Imran Khan and cleric Tahir-ul-Qadri, who have led parallel antigovernment protests, met with army chief General Raheel Sharif late Thursday after saying they had agreed to his role as ‘‘mediator and guarantor’’ in talks with the premier.
The move marks a tentative return to politics for the military barely a year after Sharif became prime minister in Pakistan’s first democratic transfer of power. The country has a long history of political turmoil and military interventions in politics, and Sharif himself was removed from office during a previous stint as prime minister in a military coup in 1999.
This time around, he has sought to assert his independence from the military with friendly policies toward Pakistan’s longtime rival India and an attempt to negotiate peace with Taliban insurgents, which made little progress.
His decision to bring treason charges against the country’s former military ruler, General Pervez Musharraf, who overthrew him in 1999, is believed to have angered the military.
But his main challenge over the past two weeks has come from the protests, which at their height brought tens of thousands of people to the capital, where they camped outside Parliament and demanded he resign over alleged fraud in last year’s election.
Defense Minister Khwaja Mohammad Asif welcomed the offer of mediation, which came after the premier asked the military to broker talks.
‘‘I think we should view it positively that the army is playing a constitutional and legal role,’’ Asif told Pakistan’s GeoNews TV.
It was not immediately clear whether the military would be able to broker a deal. After the meeting, Khan said the general told him the army would guarantee an independent and impartial judicial probe into the allegations of vote fraud. But Khan said he made it clear that there cannot be an independent investigation so long as Nawaz Sharif is prime minister.
The decision to invite the army to mediate came after direct talks with the two protest leaders collapsed earlier Thursday, with Qadri, a popular Pakistani-Canadian cleric, saying he had ‘‘shut the door’’ on further talks with the government.
It also came after police filed charges of abetting murder against the prime minister and others over the killing of 14 Qadri supporters during clashes with police in June in the eastern city of Lahore. The police accepted the charges following a complaint by Qadri’s Minhaj-ul-Quran organization.
The criminal case names 20 other defendants, including Sharif’s brother, Shahbaz, chief minister of the eastern Punjab province. The prime minister enjoys immunity as long as he remains in office and has refused to step down.
The antigovernment demonstrations initially paralyzed Islamabad. In recent days they have fizzled out, though the crowds outside Parliament still surge in the evenings.
The entry of the military raised hopes that the crisis might soon be resolved but also alarm among some activists.
‘I think we should view it positively that the army is playing a constitutional and legal role.’Khwaja Mohammad Asif, Pakistani Defense Minister
‘‘Now, we all know who rules Pakistan,’’ political commentator Asma Jehangir told DawnNews TV.