More than 5,000 supporters of Imran Khan, the jailed former prime minister, set off on a protest march toward Islamabad on Sunday after last-minute talks with the government to call off the demonstration failed.

Videos posted on the official social media feeds of Mr. Khan’s party, Pakistan Tehreek-e-Insaf, showed supporters massing across Khyber Pakhtunkhwa, the northwestern province the party governs, and leaving in convoys for what the party calls a “long march.” The demonstration had originally been scheduled for Sept. 27 and was postponed to give the two sides time to negotiate.

The negotiations did not last. Allama Raja Nasir Abbas, an opposition politician, told Geo TV, a popular private channel, that the talks were in “deadlock” over demands that included access for Mr. Khan’s doctor.

Anger over Mr. Khan’s imprisonment has been building for months, much of it over his medical treatment and whether his doctors and family can see him. The Supreme Court ruled in August that the 73-year-old should be moved to a civilian hospital for treatment; instead, the authorities returned him to prison after a short stay at a government hospital. The PTI has also demanded the release of Mr. Khan’s three sisters, whose arrests last month raised the temperature further.

Mr. Khan, a former cricket star of enormous popularity, has been locked up since August 2023. He faces scores of charges, from corruption to treason and inciting violence, in the wake of anti-establishment riots in May 2023. He and his lawyers reject every one of them, calling the cases politically motivated.

Sohail Afridi, the chief minister of Khyber Pakhtunkhwa and a man who says only the imprisoned Mr. Khan can fire him, said the marchers intended to reach Khairabad, about 80 kilometers west of the capital, by Thursday. Later phases of the plan would be announced there, he said, without giving a date for any arrival in Islamabad.

The government is not waiting to find out. Islamabad’s main access routes are blocked with double-stacked shipping containers — a barricade that was already strangling traffic and stirring resentment among truckers before the march began.

Tim Willasey-Wilsey, a geopolitics expert at the Royal United Services Institute in Britain, said the protests were “fundamentally driven by economic factors,” with the Iran war pushing up fuel prices and food prices rising on the back of the war in Ukraine. “Day-to-day life has become a real struggle for ordinary Pakistanis in recent years,” he said. “Imran Khan is the focal point for all opposition to the government.”

The state, by his assessment, holds the stronger hand. “The army and police are very capable of defending Islamabad and the government is not under any immediate threat,” Mr. Willasey-Wilsey said. “But the problems for Pakistan are piling up.”

James Dorsey, a fellow at the National University of Singapore, described Mr. Khan as “essentially a populist leader” with “a genuine popular movement that had broad popular support.” “That’s why I think you’ve seen the determination by the government to prevent [the protesters] from entering Islamabad,” he said. Given the country’s security strains — including its unresolved February war with Afghanistan — Mr. Dorsey said the government would try to avoid escalation. “It’s a problem for the government, but I don’t think it’s an existential threat,” he said.