EAST BERLIN (AP) _ More than 1,000 young Berliners from both sides of the wall gathered at a former secret police barracks to celebrate Saturday as East Germany embraced capitalism and the West German currency.

Beer ran out minutes before midnight and organizers had to turn away hundreds of people who hadn't bought tickets for the party.

The celebration at the Felix Dzerzhinsky Guard Regiment barracks was one of the biggest organized events to mark the arrival of West Germany's powerful Deutsche Mark as legal tender in both nations.

''We didn't count on this rush. There's too little to drink, and the food's running out, too,'' said organizer Christa Schwartz.

Shabbily clad East Berliners joined well-dressed West Berliners to bid a final farewell to four decades of communism and East Germany's currency, the Ostmark.

The police barracks were decorated with Communist regalia.

A bust of Karl Marx, the 19th century economist whose theories were the basis of modern-day communism, looked down on a punk band called ''The Princes of the Provinces.''

A portrait of ousted East German leader Erich Honecker gloated over the slogan ''Our (Communist Party) Program Will Live.''

The colossal police barracks is part of a sprawling complex that includes a covered swimming pool and a sports center. It is surrounded by walls and watchtowers.

Like many facilities of the former state security police, the Stasi, it has been taken for use as a community center and labor office, where jobless East Germans can apply for benefits.

Outside the building stood a huge billboard proclaiming a ''Salute to the Magnificent Fighters of the Cheka,'' the precursor of the Soviet secret service, the KGB.

The Dzerzhinsky Regiment was named for Felix Dzerzhinsky, the Polish aristocrat who organized the Soviet secret police after the 1917 Bolshevik revolution.

Upstairs in the bare concrete-and-granite building, some 500 people watched old-time East German films. A planned fashion show of 1950s-style East German clothing never got under way because of the enormous crowd.

Downstairs, there were several bars and food stalls as well as a stand selling T-shirts and postcards commemorating the East-West German economic merger.

At the stroke of midnight, an announcer bade ''Farewell to you, our beloved, our hated nation, the German Democratic Republic. Tomorrow everything will be different.''

Couples kissed and the lousdpeaker system blared three full stanzas of East Germany's national anthem as a whistling and cheering crowd tossed East German coins into the air.

Asked what he would do with his first West German money, Andreas Chila, a 25-year-old postal worker said ''I want to live just like before ... I have no intention of becoming a totally different person, some kind of consumer or other.''

At the Glanz Ecke bar elsewhere in the district, 24-year-old Thomas Weisz said he would buy a new car.