Anders Fogh Rasmussen, the Danish prime minister, has been chosen to be the next secretary-general of Nato.
Turkey had objected to Rasmussen replacing Jaap de Hoop Scheffer, the current leader whose term runs out at the end of July, criticising his handling of a row over cartoons of the Prophet Mohammed, published in Denmark in 2005.
Rasmussen said he was "honoured" by the appointment and that it was a historic day for him and for Denmark.
"I'll do my utmost to live up to the confidence shown to me by my colleagues," he told a press conference in the French city of Strasbourg, hosting the Nato summit marking the military alliance's 60th anniversary.
Rob Reynolds, Al Jazeera's senior Washington correspondent, said Nato members must have reached an agreement with Turkey, which had the power of veto to block the move, to enable Rasmussen to take the post.
He said: "The fact the deal [to choose Rasmussen] would be perceived as somehow anti-Islam certainly cannot be a good thing.
"They mended their fences within the [Nato] family, but they have to sell this deal to the rest of the world, particularly the Muslim world," he said.
"Perhaps we will hear more from Rasmussen trying to explain his position, and make amends, or at least explain, what he did - and did not do - in regards to the Danish cartoon controversy."
Recep Tayyip Erdogan, Turkey's prime minister, said he had approved the choice of Rasmussen for the post after Barack Obama, the US president, answered his objections.
Rasmussen, whose appointment had to be backed by all 28 Nato members, will succeed Dutch diplomat Scheffer on August 1.
Erdogan had said a day earlier that he had a "negative view" of Rasmussen's candidacy and urged Nato to look for someone else.
"This has nothing to do with Rasmussen personally. We just don't want Nato to get harmed," he said.
Erdogan told Al Jazeera's Frost Over The World programme, broadcast on Friday, that his country had been urged by Islamic countries to veto Rasmussen's leadership bid.
"We are receiving telephone calls from the Islamic world, telling us: 'By God, this person should not become the secretary general of Nato and we have to take into consideration all these reactions'," he said.
Rasmussen infuriated some Muslims by speaking out in favour of freedom of speech during the row over the publication of cartoons featuring caricatures of the Prophet Mohammed in the Jyllands Posten newspaper in 2006.
Turkey had also accused Rasmussen of failing to act on Turkish requests to ban a Denmark-based TV station, ROJ TV, linked to Kurdish fighters who have been fighting for an ethnic homeland in Turkey since 1984.
He has also angered Turkey by opposing its membership in the European Union.
Both Rasmussen and Obama are due to visit Turkey on Monday.