ISLAMABAD—Pakistan’s new prime minister came away from a controversial Saudi economic conference with a pledge of at least $6 billion in financial support to help the country over a balance-of-payments crisis, the Pakistani government said.

Imran Khan, elected in July, headlined one of Tuesday’s sessions at the Future Investment Initiative showcase conference in Riyadh, an event from which many Western officials and executives withdrew after the death of Saudi journalist Jamal Khashoggi at the kingdom’s Istanbul consulate this month.

The Saudis claim Mr. Khashoggi’s death stemmed from a spontaneous fistfight with Saudi security officials, but Turkey has alleged it was a premeditated killing.

Saudi Crown Prince Mohammad bin Salman telephoned Mr. Khan last week requesting he attend, the Pakistani government said.

Pakistan began talks about a bailout with the International Monetary Fund this month. It is still expected to take the IMF loan, but the Saudi aid helps its negotiating position, Pakistani officials said. Pakistan needs around $12 billion to plug its financing gap, the government said.