Mr Hekmatyar denied rumours he had been offered a truce by officials
Afghan warlord and former prime minister Gulbuddin Hekmatyar says he will not agree to any peace deal unless foreign forces leave the country.
The leader of Hezb-e Islami, which is allied to the Taliban, told the BBC there would also have to be an interim government and free and fair elections.
Mr Hekmatyar denied his group killed civilians, and said foreign forces were responsible for 95% of such casualties.
His comments came a day before Afghans vote in presidential elections.
Earlier, Afghan security forces said they had killed three insurgents who had occupied a bank building in the capital, Kabul.
The attack happened despite heightened security ahead of the presidential poll, which the Taliban have vowed to disrupt.
Mr Hekmatyar's mujahideen faction, Hezb-e Islami, was one of the groups that helped end the Soviet occupation of Afghanistan.
In the unrest that followed in the early 1990s, his group of fundamentalist Sunni Muslim Pashtuns clashed violently with other mujahideen in the struggle for control of Kabul. Mr Hekmatyar served twice as prime minister during that period.
Hezb-e Islami was blamed for much of the terrible death and destruction of that time, which led many ordinary Afghans to welcome the emergence of the Taliban. They forced Mr Hekmatyar and his men to flee Kabul in 1996.
After the Taliban were overthrown, he pledged allegiance to the new Western-backed administration in Kabul. However, after an alleged anti-government plot by Hezb-e Islami was uncovered, the group took up arms and allied itself to the Taliban.
If the foreign forces insist on continuing the war, we don't have any other way than fighting
Although his position has been weakened in recent years, he remains a key figure in the insurgency, especially in the east and parts of the north. The US considers him a "specially designated global terrorist".
In May, the BBC was told Mr Hekmatyar was willing to be interviewed, although not face-to-face. His remarks were recorded on a DVD in response to questions put by our correspondent, Ian Pannell.
In the video, Mr Hekmatyar denied that Hezb-e Islami targeted civilians, and said foreign forces were responsible for almost all of such casualties.
"It's a baseless and a sham claim. There's no truth to it. Ninety-five percent of the civilians have been killed at the hands of the foreigners - those who kill by firing rockets and bombs," he said.
"The mujahideen carry out guerrilla attacks, they lay bombs for the enemy convoys on the roadside. They do these things far away from villages, so common people are not affected," he added.
Mr Hekmatyar also denied rumours that he had been offered a truce by the Afghan government or had held talks with senior officials, but admitted that messages had been exchanged on a personal basis.
Several conditions were necessary before a ceasefire would be possible, he said, including "the unconditional departure of foreign forces and the choosing of a logical timetable for the handing over of power to an impartial interim administration".
"The holding of free and fair elections can mean an end to the war. We have said this to various sides," he added.
The Hezb-e Islami leader said foreign troops had not "achieved anything from fighting in the last eight years, other than carrying coffins".
"If the foreign forces are ready to leave our country and not insist on the occupation, if they want to end the war and look for an honourable exit - then we can help them," he said.
"But if they insist on continuing the war, we don't have any other way than fighting."
This page is best viewed in an up-to-date web browser with style sheets (CSS) enabled. While you will be able to view the content of this page in your current browser, you will not be able to get the full visual experience. Please consider upgrading your browser software or enabling style sheets (CSS) if you are able to do so.