The deputy commander of the Pakistan Taliban, who have been waging a four-year war against the government in Islamabad, confirmed the two sides were in peace talks, a move that could further fray the U.S.-Pakistan relationship.

Our talks are going in the right direction, Maulvi Faqir Mohammad, the commander of the Pakistani Taliban in the Bajaur tribal agency and the No. 2 commander overall, told Reuters.

If negotiations succeed and we are able to sign a peace agreement in Bajaur, then the government and the Taliban of other areas such as Swat, Mohmand, Orakzai, and South Waziristan tribal region will sign an agreement. Bajaur will be a role model for other areas.

At the end of September, Pakistan's government pledged to give peace a chance and talk with its homegrown militants.

There was no immediate comment from the administration on whether talks were taking place.

The United States, the source of billions of dollars of aid vital for Pakistan's military and feeble economy, is unlikely to look kindly on peace talks with the Tehrik-e-Taliban Pakistan (TTP), which it has labeled a terrorist group.

Mohammad said the government has realized that there is no military solution to the conflict in Pakistan.

We have no wish to fight against our own armed forces and destroy our own country, he said.

There has been development in our peace talks, but the government would have to show more flexibility in its stance, and restore the trust of Taliban by releasing their prisoners and stop military operations against them.

Mohammad said Pakistan had released 145 members of the group as a gesture of goodwill, and the militants had pledged a cease-fire. He added that Pakistan and Afghanistan should unite against what he called foreign occupations by non-Muslims.

Allied with the Afghan Taliban movement fighting U.S.-led NATO forces in Afghanistan, the TTP is entrenched in unruly areas along the porous frontier. It pledged to overthrow the Pakistani government after the military began operations against the TTP.

Past peace pacts with the TTP have failed to bring stability, and merely gave the umbrella group time and space to consolidate, launch fresh attacks, and impose its austere version of Islam on segments of the population.

Mohammad heads the TTP faction based in Bajaur, at the northeastern end of the Pashtun belt along the border. He is known to be close to al-Qaida. His men focused on attacking into Afghanistan until U.S. drones, hunting for al-Qaida deputy Ayman al Zawahiri, began strikes in his area in early 2006.

Mohammad was believed to have been behind several attacks on Pakistani security forces. The army launched an offensive in Bajaur in August 2008 and largely cleared the region after months of at times heavy fighting.

(Writing by Chris Allbritton and Rebecca Conway; Additional reporting by Qasim Nauman; Editing by Jonathan Thatcher)