ISTANBUL—The leaders of Turkey, Serbia and other Balkan nations gathered this weekend to commemorate the 15th anniversary of the Srebrenica massacre in Bosnia-Herzegovina, in an event seen by Turkish officials as a crowning moment in its campaign of regional diplomacy.

Tens of thousands of people turned out on Sunday to remember the execution of some 8,000 Muslim men and boys by Bosnian Serb military, in what an international court has since ruled to have been an act of genocide. Families buried another 775 of the dead, as the grim task of collecting and identifying the skeletons of those buried and reburied in mass graves continues.

Turkish Prime Minister Recep Tayyip Erdogan's presence at the funeral highlights how Ankara has stepped into a void in Bosnia left by the failure of a years-long U.S.-European Union effort to secure a new constitutional settlement aimed at ensuring stability in a still fractious nation made up of Bosnian Muslims, Serbs and Croats, diplomats say.

A Bosnian Muslim family sought refuge from the fighting in Tuzla in July 1995.

"We put everything the U.S. and the European Union could get together, and yet we could not succeed," said a senior Western diplomat in Sarajevo, speaking of the so-called Butmir process to change the constitution, named after the North Atlantic Treaty Organization military base where it was launched.

The reason: Without Russia working to persuade leaders of Bosnia's Serbian entity and Turkey pressing Bosnian Muslim leaders, a deal was "out of our reach," the diplomat said.

As the process ground to a halt last year, Ankara stepped in with a parallel effort aimed at getting the leaders of Serbia, Bosnia and Croatia talking, said Süha Umar, Turkey's ambassador to Belgrade. "We had to intervene," he said.

Serbian President Boris Tadic Sunday's ceremony, drawing some applause and some calls of "Where is Mladic?" the Associated Press reported. Gen. Ratko Mladic was the Bosnian Serb commander in charge of the Srebrenica operation. He has been indicted by the International Criminal Tribunal for former Yugoslavia in The Hague, but remains at large. Mr. Tadic pledged to "do everything" to apprehend alleged war criminals in Serbia.

In March, Belgrade, for the first time, made a formal condemnation of the Srebrenica killings, a move Western diplomats say was mediated by Turkey and aimed at smoothing Serbia's path to the EU. Serbia has arrested and handed over numerous alleged war criminals, including former Serbain President Slobodan Milosevic, who died while on trial, and former Bosnian Serb leader Radovan Karadzic, currently on trial in The Hague. The government of Republika Srpska, Bosnia's ethnic Serb entity, sent a low level delegation Saturday.

Western capitals have largely welcomed Turkey's growing involvement in the Balkans—unlike in the Middle East, where Turkey's vote against U.S.-led U.N. sanctions on Iran and its increasingly hostile relationship with Israel have triggered worries in Washington over the direction of a core regional ally.

Turkish diplomats cite their efforts at mediation among the countries of former Yugoslavia as an example of how Turkey's activist foreign policy makes it a more valuable ally to the West.

Over the past 18 months, Turkey has built a strong relationship with Serbia's pro-Western government under Mr. Tadic and organized a series of three-way meetings with ex-Yugoslav neighbors.

Ankara also played a key role in securing NATO's April decision to grant Bosnia a formal road map toward joining the alliance, despite deep reservations in Germany, the Netherlands and the U.S. about the moral hazard of offering Bosnia a route to membership when it hadn't fulfilled all conditions.

Within Serbia, Turkey's foreign minister last year successfully mediated a dispute that had led to violence between two political factions in the Orthodox Christian nation's majority Muslim Sandzak region, according to Western diplomats familiar with the matter. Two prominent Sandzak politicians supported rival Muslim clerics who in turn answered to rival muftis in Sarajevo and Belgrade.

Turkey offered highway construction, an airport conversion and industrial projects in Sandzak. On Sunday, Mr. Erdogan was scheduled to open a Turkish cultural center there.

Turkey was Bosnia's fourth-largest investor in 2009, according to the country's Foreign Investment Promotion Agency. Turkish Airlines says it is in talks to buy Serbia's main airline, JAT, having bought a 49% stake in Air Bosnia in 2008.

Around 70% of students at the new Turkish-built International University of Sarajevo are Turkish nationals, many of them young women escaping the head-scarf ban on Turkish campuses.

Not everybody accepts the growing Turkish role in a region that was under Ottoman rule for five centuries. Milorad Dodik, leader of Bosnia's Serbian entity, Republika Srpska, has said Ankara arrives with too much historical baggage and is pushing exclusively for the interests of Bosnia's Muslims, a charge Turkish diplomats deny. A spokesman for Mr. Dodik wasn't available for comment Friday.

Some Serbian newspapers have attacked Mr. Tadic for going along with Turkish mediation, saying he is abandoning Bosnia's ethnic Serbs. Spokesmen for Mr. Tadic didn't respond to requests to comment.

And not everything has gone to plan. A May visit to Belgrade by Bosnian Muslim President Haris Silajdzic, negotiated with Turkish mediation, was postponed when he said he wanted to visit a Bosnian Croat convicted in a Serbian court as a war criminal. Belgrade refused.

And while NATO gave Bosnia a Membership Action Plan, it won't become operational until elusive conditions, such as agreeing on the status of military real estate, are fulfilled.

Still, says Kurt Bassuener, a former strategic analyst for the Office of the High Representative, Bosnia's powerful international governor: "If you compare the solo Turkish diplomatic efforts to everyone else's in the past six months, they are the only people who got anything done at all."