The killing puts Pakistan, which is majority Sunni Muslim but has a large Shi'ite minority and is anxious to avoid any regional upheaval, in a sensitive position. An ally of Saudi Arabia, Tehran's arch regional foe, Pakistan has a complex relationship with Iran, with which it shares a long border.
Thousands of Shi'ite protesters marched in several Pakistani cities on Sunday to show solidarity with Iran. Some clashed with police in the southern city of Karachi when they attempted to march on the U.S. consulate.
"We're clear that Pakistan's soil will not be used against any other state, and nor will Pakistan become a part of this regional conflict," Foreign Minister Shah Mehmood Qureshi told the upper house of parliament in a policy statement.
"Pakistan has taken a clear stance that Pakistan doesn't endorse any unilateral action," he said, in the government's first official response to the killing of Soleimani, architect of efforts to extend Iran's influence across the region.
The killing has spurred fears of a major regional conflagration. On Monday hundreds of thousands of Iranians thronged Tehran's streets for Soleimani's funeral and his daughter said his death would bring a "dark day" for the United States.
"The Middle East was and is volatile and this region can’t afford another war. We are part of this region and when a fire erupts there, Pakistan can't escape," said Qureshi.
SECTARIAN FEARS
Pakistan is grappling with a severe economic crisis and facing heightened tensions with neighboring India. Its long land frontier with Iran is rife with cross-border militant activity.
Islamabad has also long had a tense relationship with the United States over the war in neighboring Afghanistan, where U.S. officials have frequently accused it of supporting the Taliban, a charge Pakistan denies.
But it badly needs U.S. support, both in handling its severe balance of payments problems and in dealing with its nuclear armed neighbor India after the two came close to war last year.
Qureshi said he had discussed the regional situation with the foreign ministers of Iran, Saudi Arabia, Turkey and others.
Pakistan receives aid and buys much of its oil from Sunni Muslim Saudi Arabia, which is locked in a power struggle with Shi'ite Iran across a region where they back opposing sides in conflicts ranging from Syria to Yemen.
Qureshi said he feared Soleimani's death could trigger an upsurge in sectarian tensions, including in Afghanistan.