U.S. and Afghan officials have shown flexibility in secret talks with one of Afghanistan's most notorious insurgent factions in the hope it will help end the country's long war, a negotiator for the outlawed Hizb-i-Islami group said on Monday.

Ghairat Baheer, the son-in-law of Afghan warlord Gulbuddin Hekmatyar, told Reuters he had held exploratory talks with CIA director David Petraeus, the former commander of coalition forces in Afghanistan.

Despite Hekmatyar's branding as a terrorist by the U.S. State Department for supporting Taliban and al Qaeda attacks, Baheer said he had also met face-to-face in the last three weeks with U.S. Ambassador Ryan Crocker in Kabul, as well as the NATO chief in Afghanistan, U.S. General John Allen.

We had exchanges of views with the people and it was productive. We are fully open to any peace efforts and our aim is to bring peace and stability in Afghanistan, Baheer said by phone from neighbouring Pakistan.

A spokesman for the U.S. embassy in Kabul declined to confirm American contact with Hizb-i-Islami, saying only that Washington had a broad range of contacts across Afghanistan and the region to support Afghan reconciliation efforts.

But another U.S. official, speaking on condition of anonymity, told Reuters Petraeus and Baheer met once last year when Petraeus commanded NATO forces in Afghanistan.

As COMISAF, with President Karzai's approval and together with a senior Afghan official, he did meet with Baheer in July 2011. He has not met with Baheer or anyone else from Hekmatyar's team since, the official said.

The United States has been holding exploratory talks with the Taliban, seen as the best chance of ending the war that began with the U.S.-led invasion of the country 10 years ago, for more than a year.

Hizb-i-Islami, which means Islamic Party, is a radical militant group which shares some of the Taliban's anti-foreigner, anti-government aims, and has widespread national support.

Hekmatyar, a former Afghan prime minister, is a fierce rival of the Taliban's leader Mullah Mohammad Omar, and became a hero to many Afghans while leading mujahideen fighters against the Soviet occupation of the country in the 1980s.

In the early 1990s, forces led by Hekmatyar opposed to the government of then-president Burhanuddin Rabbani took part in fighting in Kabul which is thought to have killed tens of thousands. Hekmatyar quit Afghanistan in the mid-1990s, and his whereabouts have been unclear since then.

BROADENING SCOPE OF TALKS

Hizb-i-Islami says it has thousands of fighters opposing U.S. and international forces based mainly in Afghanistan's restive east, bordering Pakistan, and in the north.

Afghan President Hamid Karzai said at the weekend he had met with a Hizb-i-Islami delegation for talks about broadening the scope of nascent peace talks with the Taliban, a tactic which U.S. officials acknowledge is vital for any peace process to take root.

The Taliban weeks ago offered to open a political office in Qatar to smooth the way for peace talks with the United States and other countries, in return for the release of five Taliban from U.S. custody at Guantanamo Bay.

Marc Grossman, the U.S. special envoy to the region, said on Sunday no decision had been taken on their release, billed by the Taliban as a confidence-building measure, and the Taliban had first to renounce militancy.

Baheer, who was held in U.S. detention at Bagram Air Field, north of Kabul, for six years until his 2008 release, said he had noticed flexibility on both the U.S. and Afghan side on his demands for a more representative government in Kabul when fighting ended.

We are not after power. We have presented our plan. We are optimistic that the results of our meeting are productive, he said.

(Additional reporting by Tabassum Zakaria in WASHINGTON; Writing by Rob Taylor; Editing by Janet Lawrence)