Have I stepped into a fairy tale? A mountaintop castle towers above winding cobblestone streets graced with splashing fountains, onion-domed churches and a tavern with a massive door flanked by flaming torches. From somewhere come strains of accordion music. Then a girl with purple hair whizzes by on a mountain bike and I am thrust back into the 21st century.

I cross the river on a footbridge, stopping to appreciate a street band playing Irish tunes, and then size up my choices for lunch: a French bistro, an Asian-fusion kitchen, a Mexican cantina, a kebab stand or a Viennese coffeehouse. At an outdoor cafe along the river, I order calamari and local white wine and wonder if Ljubljana is Europe's best-kept secret.

With 270,000 residents, Ljubljana (LOO-blee-ah-na) is the capital of Slovenia, a nation that has been independent for more than 20 years but is still confused with Slovakia (formerly half of Czechoslovakia), Slavonia (a region of Croatia) and Sylvania (the fictional country against which the Marx Brothers declared war in their 1933 movie "Duck Soup").

I wouldn't know about Slovenia either, except that as editor of the Utne Reader I followed the dissident movements that arose in Eastern Europe before the fall of the Berlin Wall in 1989. I learned then that Yugoslavia stood out in Eastern Europe for its relaxed version of communism, more tolerant of private enterprise, cultural expression and foreign travel. And that Slovenia, its northernmost republic, stood out in Yugoslavia.

When black-market blue jeans were selling for thousands of rubles in Moscow, Ljubljana residents were shopping in neighboring Italy and Austria. When dissidents from East Berlin, Budapest and sometimes Belgrade were being imprisoned, Ljubljana's artists, intellectuals and punk rockers spoke their minds with much less fear.

In 1991, Slovenia became the first of Yugoslavia's six republics to declare independence, and then won it in a 10-day skirmish that saw only 74 casualties and not a trace of ethnic cleansing. With just 2 million people in a country the size of New Jersey, many observers — including the U.S. State Department and some European Union officials — feared that Slovenia was too tiny to be a viable nation. It turns out they were wrong, as a quick glance at this thriving capital city shows.

At that time, Ljubljana symbolized to me what others of my generation were seeking in Prague: an exciting, exotic city emerging from the communist shadows with bright hopes and cheap rent. It beckoned as a cultural crossroads where Slavic soulfulness, German industriousness and Italian la dolce vita could happily coexist. I couldn't wait to see it.

But work and family delayed my journey to the point where I was no longer young by anyone's definition.

When I finally booked my plane ticket I was exhilarated, but also worried about what all those years of economic modernization might mean for Ljubljana. Would it be overrun by fast food, traffic jams and tourist hordes hungrily seeking the "next Prague"?

My fears are allayed within minutes of checking into my pensione on French Revolution Square. Just a few doors away I find Le Petit Café, the embodiment of my visions of a bubbling bohemian scene. Stylish young people at sidewalk tables ardently converse, fueled by prodigious quantities of caffeine, nicotine, beer, pastry and heavy cream.

I set out to explore the city of my dreams on foot and soon discover LP, a high-design bar wrapped around a highbrow bookstore inside the Slovenian Academy of Sciences and Arts. Nearby is Behemot, an exceedingly well-stocked English bookstore, strong on cultural studies and serious fiction, in a space no larger than most American bedrooms.

"Slovenians read more books than anyone else in Europe," says Cathie Carmichael, who cowrote "Slovenia and the Slovenes." "You have this almost mythic Central European town left over from the Habsburg Empire, yet the use of English is almost universal."

Preserving the culture

Mayor Zoran Jankovic boasts that his city hosts 14,000 cultural events each year — and based on the profusion of posters plastered on city walls, I believe him. A single week features appearances by the Brazilian bossa nova master Gilberto Gil and the Seattle gypsy-punk band Kultur Shock, a Toulouse-Lautrec retrospective, the International Festival of Mountain Film, a museum exhibit about the Orinoco River of South America and a World Literature Festival focused on Islam.

There is plenty of homegrown artistic expression, too. The city sports three major museums devoted to Slovenian art and design, four professional orchestras and the Slovenian National Theatre, Opera and Ballet, not to mention three history museums and one devoted to Slovenian folk customs. And the old city, which hugs both sides of the narrow Ljubljanica river, hosts many cutting-edge galleries, theaters and music clubs.

"You have to remember that, under socialism, art was the only fun we could have," Mirjam Milharcic Hladnik tells me. She is a founder of the Ljubljana City of Women Festival, a dance and theater event that attracts artists from around the world.

"We were always under someone else's rule, so we have a strong drive to preserve what we have," says Tevz Logar, artistic director of the experimental SKUC gallery.

Throughout the streets, you can hear virtuoso accordionists playing the oberkrainer folk tunes of Slovenia's mountain villages (which became a key influence on American polka music through Slovenian immigrants to the Midwest).

Multicultural mixing

One night I venture into the rustic-themed Gostilna Sestica restaurant, which features an exuberant ensemble of young musicians and folk dancers in peasant dress. A woman leads me onto the dance floor, where I demonstrate my utter inability to dance the polka, even with patient and expert instruction. To compensate for the ordeal, I order a plate of prekmurska gibanica, a layered mess of apples, cheese, poppy seeds, walnuts and spices hinting at the Hungarian undercurrents of Slovenian cuisine. It isn't much to look at but is immortalized in my mind as the best dessert ever.

In fact, many Slovenians mention food when they speak of the complicated essence of their country, which owes its existence to centuries of multicultural mixing. To sum up this culinary mash-up, Ervin Hladnik-Milharcic, senior correspondent for Ljubljana's Dnevnik newspaper, declares: "We make sauerkraut with olive oil."

I am sitting with Hladnik-Milharcic, a bear of a man with a thick gray beard, in the plush, high-ceilinged Grand Hotel Union coffeehouse, a vestige of Ljubljana's long tenure as an outpost of the Austro-Hungarian Empire. "Every dish here was born out of wedlock," he says, stirring his Turkish coffee, another emblem of the country's ambiguous geography. Most people lump Slovenia in with Germany and Austria because of its high level of economic development and traditions of punctuality, hard work and emotional reserve. (Indeed, Ljubljana is nearer to Munich than to Belgrade, the former Yugoslav capital, and nearer still to Vienna.) But when it comes to coffee, Slovenians line up with the Balkans and the Middle East by serving a thick, almost sludgy brew.

Hladnik-Milharcic, who spent years as a foreign correspondent for Slovenia's Delo newspaper, describes the whole history of Slovenia as one long process of absorbing powerful outside influences. "You know what makes Ljubljana special?" he asked. "We were never at the center of anything." From the Romans through the Austrians and now the European Union, "we draw on what's best from everywhere else, adopting ideas that have already been perfected."

Local architect left his mark

This idea is reflected in the work of Joze Plecnik, the architect and urban planner who left his imprint on Ljubljana between 1921 and 1957 with more than 250 projects around town, including the striking Triple Bridge in front of the main square, the handsome market buildings along the river, and the sumptuous red brick National and University Library. As a young man working in Vienna and Prague, Plecnik favored the groundbreaking Vienna Secession design then in vogue, but when he returned to Ljubljana he honed a softly modern neoclassical look that remains timeless today. His genius lay in appropriating details from many styles, which made him a hero to postmodern architects in the 1980s and 1990s.

A few blocks from the main square I find Metelkova, a free-form community of artists and activists who took over an old army barracks in 1993. Its legal status has been in doubt ever since. "We are in the process of legalization, but it's not signed yet," says Miha Zadnikar, the community's informal spokesman, who programs experimental music and avant-garde jazz at the Klub Gromka. In the meantime, Metelkova functions as a graffiti wonderland of art galleries, music venues, a gay and lesbian center, an organization for the disabled, a mobile anarchist library in an old bus and the unlicensed Yalla Yalla bar, which seemed to be the only spot in Ljubljana where people defy a ban on indoor smoking.

A visitor never tires of simply walking the city's streets, admiring the mix of Renaissance, Art Nouveau and Plecnik's pre-postmodern architecture. Only 60 miles from Italy, Ljubljana sports an abundance of sidewalk cafes. In 2007, Jancovic borrowed successful strategies from other European cities and designated an extensive pedestrian-only area in the old town and along the riverfront. "Every year we increase the pedestrian area and add further bicycle lanes in the city," the mayor promises. He also launched a bike-sharing program like the ones that have transformed Paris into a biking city and been a hit in Minneapolis-St. Paul.

Years ago I became fascinated with Ljubljana as the modern-day equivalent of Paris in the '20s — a hotbed of intellectuals and artists debating big issues as they stroll the riverside by day and gulp coffee and wine at sidewalk tables by night. Now I am glad for the long wait in visiting Ljubljana. Today it's even more like the city I fantasized about than it would have been 20, or even 10, years ago.

Minneapolis travel writer Jay Walljasper focuses on city life. He is the author of "The Great Neighborhood Book" and editor of OnTheCommons.org.