Mr Karzai (left) said stability in Afghanistan depended on Pakistan
Afghanistan does not want other countries' "proxy wars" fought on its soil, President Hamid Karzai has said.
He was speaking following talks with Pakistani leaders in Islamabad, and a day after Iran and the US traded blows over their activities in Afghanistan.
Mr Karzai said he did not want India and Pakistan, or anyone else, to fight their wars on his country's territory.
Parties to the Afghan conflict are rethinking policy ahead of 2011 when the US says it will begin to withdraw.
On Wednesday Iranian President Mahmoud Ahmadinejad paid a short visit to Kabul. He accused the US of playing a "double game" in Afghanistan after the US used the same term to condemn Iran's role.
Mr Karzai is making his first visit to Pakistan since his controversial re-election last year.
The trip comes amid an expected surge of Western troops in Afghanistan this summer. It also follows the recent arrests of Taliban leaders in Pakistan which indicate the military there may be willing to reign in the militants.
The BBC's M Ilyas Khan in Islamabad says Mr Karzai is visiting Pakistan amid a thaw in relations between the two countries on the one hand, and some fundamental shifts in the regional situation on the other.
The Afghan leader held detailed meetings with both President Asif Zardari and Prime Minister Yousuf Raza Gilani. He has also met Pakistan's army chief, Gen Ashfaq Kayani. Before heading to Islamabad, he had a meeting with the visiting US defence secretary Robert Gates.
"Without Pakistan and without its co-operation with Afghanistan, Afghanistan cannot be stable or peaceful," Mr Karzai told a news conference in Islamabad.
"It is also, I believe, recognised in Pakistan that without a stable and peaceful Afghanistan there cannot be stability or peace in Pakistan.
"Afghanistan does not want a proxy war between India and Pakistan in Afghanistan. It does not want a proxy war between Iran and the United States in Afghanistan," he said.
Mr Karzai also called on Islamabad to hand over the alleged Taliban second-in-command Mullah Abdul Ghani Baradar, arrested last month. Mr Gilani said his government was still considering the request.
Our correspondent says the purpose of Mr Karzai's visit appears to be to take Pakistani leaders into his confidence on the impending Western troop surge, and to find out to what extent Pakistani political and military leaders would be willing to withdraw support from the Taliban.
For their part, the Pakistanis need guarantees about limiting Indian influence in Afghanistan, our correspondent says.
They are also keen to have a role in training Afghan forces, a proposal which Mr Karzai has reportedly cold-shouldered for the moment.
Earlier, a spokesman for Mr Zardari the two presidents had agreed to hold a joint Afghan-Pakistan jirga (tribal gathering) after a similar meeting is held in Afghanistan.
A joint jirga process was initiated in 2007 but never took off because of mutual suspicions.