Updated

President George W. Bush jokes that he'll study the body language of Afghan President Hamid Karzai and Pakistani President Gen. Pervez Musharraf at the dinner table on Wednesday to see how far their relationship has frayed.

Karzai respectfully calls Musharraf "my friend" and "my brother," yet the two are constantly at odds when it comes to how to deal with Islamic extremists. Over dinner, Bush will play referee.

For months, Karzai and Musharraf have been trading barbs and criticizing each other's efforts to fight terrorists along their long, remote, mountainous border.

Under Musharraf, Pakistan was a key supporter of Afghanistan's Taliban militia before it was ousted from power by a U.S. military campaign in late 2001 for harboring Al Qaeda. But it quickly distanced itself from the Taliban following the Sept. 11 attacks and aided the Americans.

Afghan officials allege that Pakistan is letting Taliban militants hide out and launch attacks into Afghanistan. Pakistan bristles at such charges. Without the United States playing mediator, the relationship between the two U.S. allies would be tense at best.

"We're kind of the glue that helps cement the two of them," said Peter Brookes, a foreign policy and national security expert at the Heritage Foundation.

The White House dinner comes at a time of rising violence in Afghanistan. This month, a homicide bomber assassinated a provincial governor, a close associate of Karzai's. On Monday, Safia Ama Jan, a women's rights advocate who ran an underground school for girls during Taliban rule, was assassinated. The killing underscored the increasingly brazen attacks by militants on government officials and schools in Afghanistan.

Another spat between the neighbors focuses on the whereabouts of Taliban chief Mullah Omar and Al Qaeda's Usama bin Laden.

Karzai said Omar is "for sure" in Pakistan. Musharraf says he's in Afghanistan.

On bin Laden, Karzai says: "If I told you he was in Pakistan, President Musharraf, my friend, would be mad at me. But if I said he was in Afghanistan, that would not be true."

Bush remains hopeful. His three-way dinner party, just weeks before the November congressional elections, comes as he is working to convince voters that Republicans are best able to guide the U.S.-led war against terrorism.

"It's in President Karzai's interest to see (Usama) bin Laden brought to justice," Bush said Tuesday. "It is in President Musharraf's interest to see bin Laden brought to justice. Our interests coincide. It will be interesting for me to watch the body language of these two leaders to determine how tense things are."

Karzai said his government has not stopped the Taliban from committing acts of terrorism because of the country's police and military structures have been weakened from years of war. Afghanistan would be "heaven in less than a year" if it received the US$300 billion (euro236.31 billion) the United States had spent in Iraq, Karzai says.

In a veiled reference to Musharraf, Karzai said some people in the region are using extremists to maintain their own political power like "trying to train a snake against somebody else."

Pakistan rejects the accusation that it is not doing enough, saying it has deployed 80,000 troops along the porous border. Musharraf says the problem lies in Afghanistan, and that is creating the problem in Pakistan.

Musharraf, who is promoting his new memoir that claims among other things that a U.S. official threatened to bomb Pakistan "back to the Stone Age" if it didn't cooperate in the war on terrorism, recently signed a truce with militants in a tribal province where the Pakistani government has little control.

The deal requires Pakistani troops to end military action against the fighters in return for the militants stopping attacks on Pakistani forces and not crossing into Afghanistan to launch ambushes.

Barnett Rubin, director of studies and senior fellow at New York University's Center on International Cooperation, said he hopes Wednesday's dinner meeting will yield more than new talk of cooperation and how they're all "brothers in the war on terror."

If the three discuss real cooperation in ending Taliban command and control in Pakistan, or agree on a way to monitor border issues involving the Taliban, that would be a step forward, Rubin said. He said the three also should agree to have future trilateral meetings among themselves or their advisers.

Rubin says he'll also be watching Karzai's body language to get a clue about what happens at dinner.

"If he's mad, you'll probably be able to see it," Rubin said. "That'll mean that Musharraf is just stonewalling."

Musharraf said Pakistan and Afghanistan already had resolved problems in their relationship when he visited Kabul earlier this month. "God willing, in the future we have a concerted strategy and we trust each other in our fight against terrorism and extremism," Musharraf said.

"Bush feels it's better to have half an ally in Pakistan in the form of Musharraf than none at all," said Husain Haqqani, director of the center for international relations at Boston University and a former adviser to several Pakistani prime ministers.

"Karzai will probably be told to tone down his rhetoric against Pakistan," he said. "But, in the end, will it really change the one-the-ground situation? I don't think so."