SOFIA, Bulgaria - Bulgaria and Romania -- two former communist nations from one of the poorest corners of Europe -- joined the European Union on Monday to bring the bloc's membership to 27 nations.

The two, which bring 30 million new members to the union, officially joined the EU at midnight to joyous fireworks celebrations that drew tens of thousands of New Year's Eve revelers to the two capitals of Sofia and Bucharest.

"This is a day of historical justice, because Bulgarians have always been Europeans in spirit and identity," Bulgarian President Georgi Parvanov told about 2,000 people who attended an elaborate membership ceremony Monday in front of the St. Sophia church.

In Bucharest, Romanian President Traian Basescu hailed the end of the difficult journey to membership that began in 1995.

"It was hard, but we arrived at the end of the road. It is the road of our future. It is the road of our joy," Basescu said.

Bulgarian officials removed customs barriers at 15 border crossing with Greece and Romania within hours of EU membership. But controls at Bulgaria's borders with Turkey, Serbia and Macedonia were strengthened in a sign of the pressure on the new members to pursue reforms needed to meet bloc standards.

In Sofia, many wore ribbons in support of five Bulgarian nurses sentenced to death in Libya on charges they intentionally infected more than 400 Libyan children with HIV, despite evidence the children were infected before the medical workers began working at the hospital.

EU Enlargement Commissioner Olli Rehn and EU parliament president Josep Borrell voiced solidarity with the nurses.

"You are not alone. The EU is with you," Rehn said in Sofia.

Bulgaria and Romania threw off communism in 1989, applied for EU membership in 1995 and began accession talks in 2000. Negotiations ended two years ago, and the European Commission declared in September that both could join.

But the two impoverished countries are still struggling to establish Western-style legal and political institutions. Under restrictions adopted by the EU, both must report every six months to show progress in reforms -- or risk losing part of their economic aid.

Bulgaria mothballed two Russian-made reactors at its only nuclear plant in the waning hours Sunday, ceding to an EU request over safety.

Despite lingering problems with corruption and judicial reforms, both countries recently have had strong economic growth. Still, salaries remain low by western European standards. In Bulgaria, the average monthly wage is US$235, while the average Romanian earns about $400 monthly.