"Congratulations! Your place is in our European family," Charles Michel, the president of the European Council of EU leaders, told Bosnians in a post on X after announcing the decision, taken at a summit in Brussels.

"Today's decision is a key step forward on your EU path. Now the hard work needs to continue so Bosnia and Herzegovina steadily advances, as your people want."

The decision is widely seen as a historic step for Bosnia, raising hopes that the country could move beyond instability marked by ethnic rivalries and secession threats, nearly three decades after the end of a devastating war.

"Today is one of the best days in the history of Bosnia and Herzegovina," Foreign Minister Elvedin Konakovic told N1 TV, while Sarajevo's main street was decorated with hundreds of EU flags.

German Chancellor Olaf Scholz also hailed the decision. "The European peace project is growing - a clear sign in favour of a strong Europe," he posted on X.

Bosnia has taken advantage of a new openness to EU enlargement among EU officials, who have said Russia's 2022 invasion of Ukraine showed the dangers of having "grey zones" destabilised by foreign powers on the EU's borders.

In recent months, Bosnia has adopted laws related to 14 priorities set out in 2019 by the European Commission, focusing on democracy and the functioning of the state, the rule of law, fundamental rights and reform of public administration.

The Commission last week recommended the EU open membership talks with Bosnia, noting significant progress on several issues. But the country has yet to adopt laws on courts and election reform, both priorities set out by the Commission.

At the summit, the EU leaders agreed that the bloc would take the next step toward membership talks - the adoption of a negotiating framework - as soon as Bosnia took "all relevant steps" recommended by the Commission in October.

Negotiations would likely take many years with many more political and economic reforms necessary to achieve membership.

Elvira Habota, the chief Bosnian official for European integration, said Thursday's decision "carries with it a wave of optimism for citizens, institutions, authorities and the whole Bosnian society".

(Reporting Nette Nöstlinger, Daria Sito-Sucic, Bart H. Meijer and Andrew Gray; Editing by Bill Berkrot)

By Nette Noestlinger, Daria Sito-Sucic and Andrew Gray