By Caroline Davies, BBC Pakistan correspondent
Nawaz Sharif and Bilawal Bhutto's parties in Pakistan have reached a deal to form a government.
Bhutto's PPP said it would help Sharif's PML-N elect a prime minister after last week's election.
The two parties were previously in a coalition that ousted Imran Khan from power in 2022.
This time, independent candidates backed by his Pakistan Tehreek-e-Insaf (PTI) party unexpectedly won the most seats.
PPP leader Asif Ali Zardari told a press conference that although his party and PML-N had contested elections against each other, they had come together in the interests of the nation.
"It is not necessary that [we fight] forever," Zardari said.
The PML-N said in a statement that both parties had agreed to cooperate in the interests of political stability.
The results - in which independents backed by the PTI took 93 out of 266 directly elected seats - had left voters uncertain about which parties would form the next government.
Sharif's PML-N won 75 seats while Bhutto's PPP came third with 54 seats.
In addition, parties will be allocated more seats from the 70 reserved for women and non-Muslims. These additional seats are not available to independent candidates.
According to PML-N official Marriyum Aurangzeb, party leader Sharif plans to nominate his brother Shehbaz to be prime minister. Both men have previously served as prime minister.
While Bhutto said his party would help elect a PML-N prime minister, he earlier said it would not take any cabinet positions.
Imran Khan and his party have continued to emphasise that they believe the elections were rigged against them and plan to challenge the results.
"I warn against the misadventure of forming a government with stolen votes," he said.
"Such daylight robbery will not only be a disrespect to the citizens but will also push the country's economy further into a downward spiral."
- This story was first published by the BBC.