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.