STRASBOURG, France - NATO named Danish Prime Minister Anders Fogh Rasmussen as its next leader on Saturday, averting a damaging split with Turkey at a summit celebrating the 60th anniversary of the military alliance.
The meeting of the 28-nation group, jointly hosted by France and Germany, prompted days of demonstrations and culminated in violent clashes between police and anti-NATO protestors.
Demonstrators set ablaze a former frontier post on the Franco-German border and police fired teargas and shock grenades to try to contain the violence. At least 50 people were injured.
U.S. President Barack Obama, greeted by cheering crowds on his first trip to Europe, had come seeking European support for a new strategy in the war in Afghanistan. He hailed his allies' support even though, as expected, did not win any long-term troop commitments for the war against Taliban militants.
The United States came here to listen, to learn and to lead, because all of us have a responsibility to do our part, Obama told reporters at the end of the two-day summit.
America cannot meet our global challenges alone. Nor can Europe meet them without America.
Obama also played a role in brokering the deal with Turkey.
Ankara had opposed Rasmussen's candidacy because of his handling of a 2006 crisis over cartoons of the Prophet Mohammad in a Danish newspaper.
Rasmussen had defended the publication of the cartoons at the time on the grounds of free speech and refused to apologize to Muslim countries.
To convince Ankara to drop its objections to Rasmussen, Turkey said Obama had given it guarantees that one of the new NATO chief's deputies would be a Turk and that Turkish commanders would be present at the alliance's command.
Turkish sources said Obama met Turkish President Abdullah Gul and Rasmussen on Saturday morning to try to seal a deal and avert a damaging row that would have dashed NATO's hopes of making the summit a show of unity.
NATO members came to the summit in the French city of Strasbourg and German towns of Kehl and Baden-Baden hoping to forge a new strategic vision for an alliance that was created soon after World War Two to defend Europe's borders.
NATO accepted France back into its military command after four decades, and welcomed Albania and Croatia as members.
The group has expanded to 28 nations despite the demise of its first foe, the Soviet Union, but is struggling in Afghanistan, seven years after U.S.-backed forces toppled the Taliban following the September 11 attacks on the United States.
NATO members agreed at the summit to send 5,000 additional troops and trainers, including 3,000 soldiers that will help provide security during Afghan elections in August.
But Obama did not secure any of the long-term troop commitments from European countries he might have hoped for and the new pledges will do little to silence criticism that the war is becoming increasingly Americanized.
The United States has 38,000 troops in Afghanistan, more than all the other national contingents put together. Obama has said he will add an extra 17,000 combat troops as well as 4,000 others to help train Afghan officials.
European leaders are reluctant to send more of their own soldiers to a war that is unpopular with voters, preferring to focus their energies on reconstruction and development.
Masked youths hurled petrol bombs, smashed windows and ransacked shops, temporarily forcing massed ranks of police into retreat in Strasbourg.
German police water cannon crossed the short distance into neighboring France to help put out fires, which gutted a row of low storey buildings and ravaged a seven-storey IBIS hotel.
I can't believe the IBIS hotel is burning with all the police that are here. You see that kind of thing on television but in our city that is a whole different thing, said resident Dany Herrenschmidt.
The worst of the violence was centered close to the French side of the Bridge of Europe -- a road link over the river Rhine which connects France with Germany. The bridge is 5 km (3 miles) from the conference center where the leaders met and a pall of black smoke was clearly visible from the summit venue.