President Barack Obama's "bury the hatchet" meeting with Afghan President Hamid Karzai Wednesday at the White House ended with smiles and promises of future cooperation, as well as warnings from both that hard fighting and difficult political decisions lie ahead.

Mr. Obama's resolve to mend fences with Mr. Karzai was timely and essential. The president has already set a difficult goal for U.S. and NATO forces in Afghanistan, giving them little more than a year to quell the Taliban before he begins to remove troops from the country and turn Afghan security over to Afghan forces.

Achieving that goal will be difficult even with the full cooperation of President Karzai. Without his cooperation, it will be impossible.

The Afghan president has his shortcomings, and so does his government. But no matter how much the White House may fume over their weaknesses, it has been unwise to dwell on them to the exclusion of our mutual interests.

With the notable exception of Gen. Stanley McChrystal, the top U.S. commander in Afghanistan, Mr. Karzai has heard public criticism from nearly every senior administration official, including the American ambassador in Kabul, the secretary of state, the president's top national security adviser and Mr. Obama himself.

There is little doubt that this flood of negative comments, together with the president's pledge to start reducing U.S. military strength in July 2011, has weakened the Afghan president in his own country and made it easier for the Taliban to woo fence-sitters to their side.

President Obama is right to end this contentious pattern. He should tell his team to take their cues from Gen. McChrystal, who confers with Mr. Karzai regularly, offers him respect in public and includes him in his visits to the field.

Mr. Obama should replace Ambassador Karl Eikenberry, who called Mr. Karzai "not ... adequate" in a cable leaked to the press. That disdain for the Afghan president is bound to rankle him.

Mr. Eikenberry, a retired Army lieutenant general, once commanded U.S. forces in Afghanistan and has extensive political contacts throughout the country.

But his presence in Kabul presents ongoing problems, and he appears to have a strained relationship with Gen. McChrystal, who has a different military strategy and a different command style.

The U.S. military and diplomatic team in Kabul should speak with one voice aimed toward one focus -- stabilizing the nation by defeating the forces of extremism. And that goal must be clearly expressed by President Obama, who should consider reviving a practice of his predecessor, George W. Bush, by holding regular telephone talks with President Karzai to discuss mutual concerns.

The conflict in Afghanistan is too important to be undermined by counterproductive sniping among allies.