KABUL – A confident President Hamid Karzai on Monday offered peace talks to Taliban militants if they renounce violence and called for a new relationship with the West if he wins a second term in next month's presidential election.

Karzai is considered the favorite in the Aug. 20 vote. But his chances could hinge on his fellow Pashtuns in the turbulent south and east, where U.S. and British forces this month have suffered some of their highest casualties of the eight-year war.

His only serious competition in the 39-candidate field is believed to be former Foreign Minister Abdullah Abdullah, who could force a runoff if a low turnout among the Pashtuns, the country's biggest ethnic group and the heart of the Taliban ranks, prevents Karzai from claiming a majority of the votes.

In an interview with The Associated Press in his modest office, Karzai reached out to disaffected Pashtuns, calling for a dialogue with Taliban members who are not affiliated with al-Qaida and who are willing to repudiate violence "and announce that publicly."

But the president said he was not yet prepared to discuss the key Taliban demand — a timetable for the withdrawal of all foreign troops — because he contends their continued presence is in the national interest.

"The Afghan people still want a fundamentally strong relation with the United States," Karzai said. "I also know and the Afghan people also know that the presence of international troops in Afghanistan is bringing stability to Afghanistan."

Nevertheless, Karzai said the U.S. and NATO presence must be based on a partnership where "the partners are not losing their lives, their property, their dignity as a consequence of that partnership."

During the half-hour interview, Karzai appeared relaxed and confident, even joking about his sometimes shaky relationship with the U.S. and its allies. Karzai was once hailed as the salvation of Afghanistan following the ouster of the Taliban in 2001, but over the years his government has been increasingly criticized as weak and corrupt.

"When Hamid Karzai was quiet and there was no trouble between us, Hamid Karzai was a good man," he quipped. "And now that there is a little trouble, he's a bad man."

Karzai's offer of talks with the Taliban was echoed Monday by British Foreign Secretary David Miliband, whose country has lost 22 soldiers this month in Afghanistan. Miliband said in a speech at NATO headquarters that rank-and-file Taliban fighters should be given the opportunity "to leave the path of confrontation with the government."

A Taliban spokesman, Qari Yousef Ahmadi, rejected such talks, saying the militants would not discuss a cease-fire with any government that was a "servant of the foreigners." He urged Afghans not to take part in next month's election.

Afghan authorities have long complained that the Taliban exploit public discontent over the issues of civilian casualties and searches of private homes. Discontent runs highest in Pashtun areas that have seen most of the fighting since the hardline Islamic movement rebounded from its ouster from power in the U.S.-led invasion of 2001.

The Interior Ministry acknowledges that 10 of the country's 360 districts are not under government control. One-third of the 360 districts are considered high-risk areas, according to the ministry.

U.S. and NATO authorities have recognized the risk of alienating the civilian population.

Soon after assuming command of NATO and U.S. forces last month, Gen. Stanley McChrystal ordered troops to limit the use of airstrikes to prevent civilian casualties. He also ordered that international troops must be accompanied by Afghan forces before entering homes.

During the interview, Karzai also said he wants operations at the U.S.-run prison at Bagram Air Base, where about 600 Afghans are held, re-evaluated and inmates released unless there is evidence linking them to terrorism. He said arrests are turning ordinary Afghans against U.S. and NATO forces.

Instead, both sides should work toward a relationship in which foreign troops show greater sensitivity to Afghan culture and the Afghans display "better management of governmental affairs," Karzai said.

Karzai also the Afghan government was "completely against the mushrooming of private security firms" which played a major role in the Iraq war. U.S. military authorities in Afghanistan are considering hiring a private contractor to provide around-the-clock security at dozens of bases and protect vehicle convoys moving throughout the country.

But Karzai said reliance on private contractors "runs counter to the growth and development of our own institutions" and that the money would be better spent training and equipping Afghanistan's own army and police force.

Karzai has come under criticism for embracing some of Afghanistan's most notorious warlords, including his vice presidential running mate Mohammad Qasim Fahim, and his defense adviser, Gen. Rashid Dostum, who has been accused of killing hundreds of Taliban prisoners in 2001 by suffocating them in sealed cargo containers.

Karzai defended those ties, saying many of those now branded as warlords had received "millions and millions of dollars" from the United States for their help in fighting the Taliban in the 2001 U.S.-led invasion.