When the Soviet empire crumbled 20 years ago, exiled Rigans began to return to the Latvian capital to restore their treasures. Adrian Mourby reports

Twenty years ago, the Bergs were living in America when they heard the news. Eastern Europe's communist regimes were tumbling like dominoes. Maybe this was the time to go back and see what was left of the old family business, and the rest of Riga?

Sitting in the café at Bergs Bazaar today, I can see that a lot was left; it just wasn't in very good condition. "As a child, I remember Bergs as a scary place," says Ilze Spigule, who now works for the family. "The shops had lost their stucco and brick walls sealed off some of the lanes."

Like so much of Latvia, Riga was dusty and overcrowded under communism. Streets were renamed and Soviet-style apartment blocks were thrown up. But, fortunately, there was neither the money nor the resolve for the kind of wholesale destruction that Nicolae Ceausescu visited on Bucharest.

And the city is now returning to its pre-war heyday. Kirov Park, across the street from Bergs, is once more known as Vermanes Park, after the German family who paid for its construction, and Bergs Bazaar is well and truly back in business.

The building is an odd structure hidden away down a side street where the medieval ramparts once ran. In 1870, a local entrepreneur called Kalnins bought a large cabbage patch and turned it into a series of enclosed lanes with 130 shops huddled together like an Oriental souk. At the centre of this warren he built an apartment block. This was a time of great prosperity, because Riga was the major Tsarist port on the Baltic. A canny Latvian, Mr Kalnins realised that German names were a fashionable necessity if you wanted to get on in Riga, so he changed his name to Bergs and prospered. In Latvian, Kalnins means "little hill".

The Bergs family story is emblematic of Riga, one of the most beautiful cities in northern Europe. Despite the German invasion during the First World War, the Bergs stayed put, while fellow Rigans Sergei Eisenstein's family fled to St Petersburg and Sir Isaiah Berlin's family (who had lived in an apartment block designed by Eisenstein's father) ended up in Oxford. In 1941, however, when the Soviet Union began its deportation of 14,000 Latvians, the Bergs knew better than to hang around. They fled first to Germany and then to the United States.

After 1945, the forced movement of Soviet citizens around the USSR led to more and more people being crammed into Bergs Bazaar. Most of the shops closed and the accommodation block became a series of one-room apartments with shared kitchens and bathrooms.

After 1989, and the fall of the Berlin Wall, the Latvian government edged towards a programme of what was called "denationalisation". In 1991, the Bergs were allowed to start restoring their bazaar. They employed Zaiga Gaile, a Rigan architect, to turn the old accommodation block into a five-star hotel. Zaiga was the wife of Maris Gailis, the third prime minister of independent Latvia. When he retired, the two of them went on a tour of Africa together and Zaiga bought up a container load of carvings, which is why today the hotel is full of Bergs family portraits in oils and rather a lot of modern African art. The old interior had to be completely refashioned, because the only decoration to survive from the 1870s were four very elaborate fireplaces.

It's only a short walk from Bergs into the old city centre but it's highly instructive. Riga is a Unesco World Heritage Site because the long years of neglect meant that its rows and rows of Jugendstil housing, a legacy of those years of German prosperity, were never demolished.

Along the line of the old defensive moat, I pass the neoclassical opera house which opened in 1863 as Riga City Theater. It was subsequently known as the German Theatre, then the Latvian Soviet State Opera and Ballet Theatre and is now the Latvian National Opera, although locals refer to it affectionately as "our White House" because of its striking white and grey paintwork.

After independence, the opera house was one of the first buildings to be restored. Today, it positively shines in the sun. I notice stage scenery being unloaded from vans that have "A Gift From Latvian National Opera Guild USA" written on the side of them. After the end of the Cold War, Latvia's American diaspora poured a lot of money into Riga.

In the centre of the old city I meet historian Juris Berze in front of the newly-restored Melngalvju or "Blackheads" House. It's an unpleasant name for a stunning building that has images of the Virgin and a black saint on its gateposts. The red brickwork contrasts vibrantly with white stone quoins, white scrollwork and white obelisks tumbling down the edges of this medieval hostel. Melngalvju was built in the 14th century to house unmarried merchants visiting Riga. It was given a baroque makeover in the 18th century, played host to Wagner and Liszt in the 19th, and was blown up during the Second World War.

"It was a bombsite under the communists," Juris tells me. "Then in 1999 we started work on reconstructing it from scratch." Nowadays, it's a picture-perfect symbol that sells Riga, the reborn city, all round the world.

What interests me, however, is the structure next door. The Museum of the Occupation of Latvia was built in the 1970s. Its original function was to commemorate the regiment of Latvian riflemen who had fought for Lenin in 1917. It's a low, black-and-grey bunker-like structure that intrudes into the square in a deliberately acontextual manner, creating an aggressive break with the architecture of the past.

"Once the communists were gone and definitely not coming back, it was reworked and renamed," says Juris. "Now it is a museum commemorating the years when we were occupied, first by Nazi Germany, then Soviet Russia." Inside, the museum is dense with memorabilia of the many deportations. There is even a reconstruction of the kind of flimsy gulag huts that "class enemies" were given to live and die in on reaching Siberia.

The Museum of the Occupation has been given a reprieve. It's not pretty but it serves an important function. Other memorials of that dark time have already gone. North of the square, a large parcel of land along Tirgonu iela (street) has recently been cleared. A huge ugly building of reinforced concrete from the communist era once stood on this spot. It was part of Riga Technical University and cast a shadow over the (recently rebuilt) 18th-century town hall. When a developer was found for the site, he was obliged to demolish the monstrosity before he submitted plans for building anew.

From Tirgonu, I walk down Rozena ilea past a new medieval-style restaurant, housed in a real medieval cellar, with waiters in period dress sitting outside smoking between shifts. Around the corner on Jaun iela, I come upon a glorious Jugenstil building owned by the writer Andra Neiburga. The Neiburgs are another family who have regained their property in Riga and Andra and her artist daughter, Katrina, are busy transforming this site into a restaurant and hotel.

The Neiburgs' property portfolio was created by Ludvigs Neiburgs, a penniless country boy who arrived in Riga in 1891, trained as a mason and became the biggest builder in Latvia. On 14 July 1941, the fateful day when the Soviet deportations began, the entire Neiburgs family was in the countryside except for one daughter who was seized in Riga and sent to Siberia. Two of Neiburgs' children eventually escaped to the West via Germany, but a son, who had served in the Latvian army, spent 10 years in a labour camp.

The Neiburgs' property across Riga was nationalised after 1945 and many apartments were given to Stalin's generals. This block on Jaun iela became a restaurant, Pie Kristapa, solely for the party faithful. Towards the end of the communist era it would often be empty, but customers were still turned away if they were not nomenklatura. Ludvigs Neiburgs died in 1948, but in 1993 Andra Neiburga, who was living the breadline existence of an artist in Soviet times, got some of her family's property back. In July this year, the Jaun iela building opened as Neiburgs restaurant. Work continues on the hotel, which will open early next year.

A similar tale is being told to the north of the old city not far from the National Theatre, where a new Kuze café has been established in an Art Deco building on Jekaba iela. A branch of the old Kuze family now owns this building, once the property of Vilhelms Kuze, known as "The King of Sweets" in pre-Second World War Riga. His confectionary won international prizes and he was a popular philanthropist.

In July 1941, Kuze and his family were deported to Siberia as "class enemies" and they soon died of starvation and illness in the labour camps there. A survivor told of seeing Kuze at the end of his life sitting on a tree stump in the labour camp yard concocting recipes for theoretical jams and biscuits.

The Kuze company was nationalised in 1941. Now, a distant family branch who survived the war is opening a new café, named V Kuzes in honour of the King of Sweets. "The café will use his recipes and develop new confectionary in the spirit of Kuze," says his great-grandson Maris Veidemanis.

It's no exaggeration to say that these returning families can be seen as a metaphor for what has happened in Riga since the fall of communism. The Soviet past has been swept away. The new owners pay homage to their heritage while making sure their family investment will make money. Riga is catching up fast.

Compact Facts

How to get there

Air Baltic (00 371 6700 6006; airbaltic.com) offers return flights to Riga from £94. Hotel Bergs (00 371 6777 0900; hotelbergs.lv) has double rooms from €180 (£165) per night. Breakfast costs €20 (£18) per person.

Further information

Blackheads House, Ratslaukums 7 (00 371 6704 4300); Latvian National Opera, Aspazijas bulvari 3 (00 371 6707 3777; opera.lv); Museum of Occupation, Strelnieku laukums 1 (00 371 6721 2715; occupationmuseum.lv); Restorans Neiburgs, Jaun iela 25/27 (00 371 6711 5544); Kuze Cafe, Jekaba iela 20/22 (00 371 6732 2943; kuze.lv).