LONDON — Thousands of Pakistanis rallied behind the former cricketer Imran Khan on Thursday as he led a motor cavalcade toward the capital, Islamabad, for a protest to demand the resignation of Prime Minister Nawaz Sharif and fresh elections.
The rally started in the city of Lahore, 160 miles to the south, with dancing and singing from Mr. Khan’s boisterous supporters. It was expected to reach Islamabad, the capital, as early as Friday afternoon. A smaller group, also bound for Islamabad, was led by Muhammad Tahir-ul Qadri, a cleric who has promised a “peaceful revolution” in Pakistan.
The march, timed to coincide with the 67th anniversary of Pakistan’s independence, followed weeks of growing political tension in the country. It is the strongest challenge yet to Mr. Sharif’s 14-month-old government.
Apparently rattled by plans for the protest, the government employed heavy-handed tactics in recent weeks. Riot police officers clashed with Mr. Qadri’s supporters across Punjab Province last weekend, resulting in at least two deaths. Mr. Sharif closed roads leading to Islamabad and invoked public-order laws that ban meetings on its streets.
His reaction appeared to stem in part from speculation that the political tumult could open the way for a military coup — a fate that Mr. Sharif suffered in 1999, leading to his imprisonment and then seven years in exile. But by late Thursday, those fears had dissipated somewhat after the government reluctantly agreed to allow the protests to proceed.
Mr. Sharif also made a show of unity with the military leadership, appearing twice alongside the powerful army chief, Gen. Raheel Sharif. Late Wednesday, the two men, who are not related, attended a military ceremony outside Parliament. On Thursday, they traveled to insurgency-stricken Baluchistan Province for a ceremony to mark the reopening of Ziarat House, a former residence of Pakistan’s founding father, Muhammad Ali Jinnah. The house was burned to the ground last year by Baluch separatists.
“The country cannot afford any more subversion and negative politics,” Mr. Sharif said in a speech.
Mr. Khan’s “independence march,” as he calls it, is driven by accusations that Mr. Sharif’s party rigged the general election in May 2013. The results handed Mr. Sharif a handsome majority in Parliament, although Mr. Khan’s Pakistan Tehreek-e-Insaf party won control of the government in Khyber-Pakhtunkhwa Province.
The popularity of Mr. Khan, 61, a former captain of the national cricket team and an enduring sex symbol — he was photographed bare-chested outside his home in Lahore this week — is built on his appeal to young Pakistanis disillusioned by traditional politics. In recent days, supporters camped outside his home, and several spoke of “revolution.”
“We will go to Islamabad and sit there for days, months and even years until our demands are met,” said Ayesha Ahmed, a Lahore woman in her early 30s who wore a dress in the colors of Mr. Khan’s party.
But Mr. Khan has also faced criticism from critics who see his protest as a power grab by an electoral loser, and a needless distraction when Pakistan is facing pressing challenges from an ailing economy and Islamist insurgents. The army has been fighting in North Waziristan, home of the Taliban rebellion, since mid-June.
“We should by now have learned from our history,” Kamila Hyat, a prominent human rights activist, wrote on Thursday in The News, a daily newspaper based in Karachi. “Disrupting democracy, demanding elected leaders resign or grappling for power has never served us well before.”
The picture is further complicated by the return of Mr. Qadri, who normally lives in Canada and who led protests in January 2013 against the previous government, which was headed by President Asif Ali Zardari. Although Mr. Qadri’s party has no seats in Parliament, Mr. Sharif inadvertently bolstered his credentials in June when riot police officers clashed with his supporters in Lahore, resulting in at least nine deaths.
Although Mr. Qadri and Mr. Khan lead separate protest groups, they have formed a loose alliance and seemed set to appear, separately, on the streets of Islamabad on Friday. Government officials said the protesters would be allowed to demonstrate at Zero Point, a major traffic intersection on the edge of the city.
Mr. Khan said he intended to lead a sit-in until his demands were met. His party published a photo showing him packing overnight belongings into a bag from Selfridges, a high-end London department store. Critics on social media said the picture belied his image as a man of the people.
As darkness fell, the military’s attitude remained the march’s greatest unknown. While there was little evidence that the generals wanted to take over, analysts said, they could take advantage of any discord to reassert themselves more openly in politics.
“This looks like a manufactured crisis, designed to destabilize the Nawaz government,” said Rasul Bakhsh Rais, director general of the Institute of Strategic Studies Islamabad, a government-funded organization. “If the military is not behind these protests, then what will Imran get out of it? This is a big gamble on his part.