The attack comes as Afghans gear up for a presidential election later this month and as the country battles a raging Taliban insurgency.

The militants are strongest in the country's south but attacks do occur elsewhere including the relatively calm west.

THIS IS A BREAKING NEWS UPDATE. Check back soon for further information. AP's earlier story is below.

KABUL (AP) — Three American soldiers died in a complex militant ambush in eastern Afghanistan on Sunday, raising NATO's two-day August death toll to nine and continuing the bloodiest period of the eight-year war for U.S. and allied troops.

The U.N.'s representative in Afghanistan, meanwhile, called for peace talks with the Taliban's top leadership, saying deals with local militant commanders as proposed by Britain's foreign secretary would not be enough to end the violence.

Kai Eide's call is another indication that parts of the international community favor reaching out to the top echelons of the radical Islamist movement in their attempts to bring peace, as the conflict widens and Western public opinion wavers in the face of rising death tolls.

Militants in eastern Afghanistan killed the three U.S. troops with gunfire after attacking their convoy with a roadside bomb, the U.S. military said.

The deaths Sunday brought to nine the number of NATO troops killed this month, after six NATO troops died on Saturday. Six of the nine deaths were American. July was the deadliest month for international troops since the 2001 U.S.-led invasion to oust the Taliban government for sheltering al-Qaida leader Osama bin Laden, with 74 foreign troops, including 43 Americans, killed.

A record 62,000 U.S. troops are now in Afghanistan, more than double the number a year ago. President Barack Obama has increased the U.S. focus on Afghanistan as the Pentagon begins pulling troops out of Iraq. Other NATO countries have about 39,000 troops in Afghanistan.

"We have a lot more troops in country. We have a lot more operations ongoing, and it increases our contact with the enemy, and that unfortunately results in an increase in casualties," said Lt. Cmdr. Christine Sidenstricker, a U.S. military spokeswoman.

Sidenstricker said she could release no more details about Sunday's attack, including the province in eastern Afghanistan in which it occurred. Military officials still had to inform family members of the deaths, she said.

Three American troops, two Canadians and one French soldier died on Saturday.

Roadside bombs have become the militants' weapon of choice in Afghanistan, and the number of such attacks has spiked this year. U.S. troops say militants are now using bombs with little or no metal in them, making them even harder to detect. Militants are also planting multiple bombs on top of one another and planting several bombs in one small area.

U.S. commanders have long predicted a spike in violence in Afghanistan this summer, the country's traditional fighting season, and Taliban militants have promised to disrupt the country's Aug. 20 presidential election.

Eide, the U.N.'s chief in Afghanistan, said only talks with the top tier Taliban have a chance of bringing an end to the conflict.

"If you want relevant results, you have to talk to those who are relevant. If you want important results, you have to talk to those who are important. If you only have a partial reconciliation process, you will have partial results," Eide told reporters.

While the need for talks with the Taliban is recognized across the international community, the conditions attached to such proposals — and the timing of the talks — are a bone of contention.

President Hamid Karzai has repeatedly called for talks with Taliban leaders on condition that the militants accept Afghanistan's constitution and renounce violence. Karzai has even personally guaranteed safe passage for Taliban leader Mullah Omar if he attends such talks.

Omar, who is believed to be hiding in Pakistan, has publicly dismissed the overtures, calling Karzai an American puppet and saying no talks can happen while foreign troops are in the country.

Adm. Mike Mullen, the chairman of the U.S. Joint Chiefs of Staff, has also said he expects talks to help end the Afghan conflict. But Mullen said the time was not yet right for negotiations.

Behind the public posturing, several Gulf countries are working on sketching out the contours of a political process that could eventually end the expanding conflict.

Eide's remarks follow calls made last week by British Foreign Secretary David Miliband for talks with regular Taliban fighters.

Miliband said that while hard-line fundamentalist commanders committed to a global jihad must be pursued relentlessly, rank-and-file Taliban should be given the opportunity "to leave the path of confrontation with the government."

He said Afghanistan's government must develop "a political strategy for dealing with the insurgency through reintegration and reconciliation" and "effective grass-roots initiatives to offer an alternative to fight or flight to the foot soldiers of the insurgency."

U.S. Secretary of State Hillary Rodham Clinton said Washington agrees with the British analysis of the way forward.

Eide said his approach is more comprehensive.

"If you do want a comprehensive peace process, it is not enough to talk to the commanders on the ground," Eide said.

"It is a political process, and I think you also have to approach the more political structures of the insurgency movement," he said, without naming any insurgent leaders.