(Bloomberg) -- Pakistan’s two main family-controlled parties agreed to form a government, a move that breaks an almost two-week deadlock and likely keeps jailed former premier Imran Khan’s party out of power even though it won the most seats in the country’s contentious election.

Bilawal Bhutto Zardari’s Pakistan Peoples Party will join a coalition with the Sharif clan’s Pakistan Muslim League-Nawaz, Bhutto Zardari said at a joint news conference in the capital Islamabad close to midnight local time on Tuesday. Shehbaz Sharif will be prime minister while Bhutto Zardari’s father, Asif Ali Zardari, will be nominated as president.

“Both the parties have the numbers to form a government,” Bhutto Zardari, 35, the son of slain former premier Benazir Bhutto, said, with his father and Sharif next to him.

The development will probably end days of uncertainty after the inconclusive Feb. 8 election, in which Khan’s candidates, running as independents, defied the odds by winning the most seats but fell short of clinching an outright majority. Rounds of negotiations followed, culminating in the announcement Tuesday night.

Pakistan’s markets gained after the news. The benchmark stock index rose as much as 1.8%, while dollar bonds due 2031 climbed 2.6 cents to 67.5 cents on the dollar and notes maturing 2051 also rose. 

For some investors, attention shifted to who would form the cabinet if the parties form a government. Pakistan’s nine-month bailout program from the International Monetary Fund expires in April, and Sharif has said negotiating a new deal with the lender will be a priority.

“The new finance minister and his or her team is crucial for talks with IMF and to manage the economic issues,” said Mohammed Sohail, CEO of Karachi-based brokerage Topline Securities. 

Questions also remain about how Khan’s supporters will respond. His Pakistan Tehreek-e-Insaf party posted on X a picture of Sharif, Bhutto Zardari and his father moments after the announcement, using the hashtag #MandateThieves. 

The party, also known as PTI, held protests over the weekend against alleged vote-rigging. Its claims were bolstered when a Pakistani official said he had manipulated the vote count — and that the Election Commission of Pakistan, which oversaw the polls, was also involved. The ECP and the interim government of Prime Minister Anwaar-ul-Haq Kakar deny allegations of rigging. 

PTI was effectively barred from contesting in the elections under its own name after its coveted cricket bat symbol, used on ballot papers to help illiterate voters identify candidates, was taken away. The authorities also stopped most of its campaign rallies. The party ran its candidates as independents and attempted to stage online rallies, which were disrupted by social media blackouts. 

Social media platform X, formerly Twitter, remained inaccessible for a third day across Pakistan Tuesday, according to internet watchdog NetBlocks, as authorities moved to thwart the protesters.

The deadline for holding a parliament session for forming the new government is Feb. 29, Murtaza Solangi, the country’s interim information minister, has said.

The new administration will have to shore up an economy battered by Asia’s fastest inflation, running at 28%. At the press conference with Bhutto Zardari and his father, Sharif said the challenges will be “a journey of blood, sweat and sacrifice.”

Pakistan is getting by on the basis of loans, he told reporters. “We will have to end this, but it’s easier said than done.”

Analysts said it’s unlikely to be smooth sailing for the new coalition. 

“They will now have to take everybody along on each issue,” said Ahmed Bilal Mehboob, president of the Pakistan Institute of Legislative Development and Transparency in Islamabad. “Decision-making will be slow.”

This isn’t the first time the two old-guard parties have come together. They spearheaded a coalition after Khan was ousted in April 2022 and ruled the country for about 16 months. Shehbaz was prime minister, while Bhutto Zardari was his foreign minister. 

During that period, Bhutto Zardari’s party appeared to distance itself from the economic reforms carried out by the Sharif government, including raising fuel prices.

For this year’s election, the two parties contested as rivals but later agreed to hold talks to “save the country from political instability,” according to Sharif. 

--With assistance from Khalid Qayum, Karl Lester M. Yap, Ronojoy Mazumdar and Chiranjivi Chakraborty.

(Updates with market reaction in fifth paragraph)

©2024 Bloomberg L.P.