It could be the architecture — the soaring cathedrals built on Roman ruins — that draws visitors to the ancient Hungarian city of Sopron.

Or maybe it’s the sidewalk cafés, with their delectable pastries such as the dense chocolate Sachertorte or the Ferenc Rahozzi, a multilayered cheesecake, which bring them to this town along the Austrian border.

Then again, it’s probably the teeth.

With more than 300 practicing dentists — about one for every hundred residents — Sopron is arguably the world’s dentistry capital. Patients come here from as far away as Japan, Germany and the Netherlands for tooth work. One in three Austrians reportedly crosses the border to see a Hungarian dentist.

Why Sopron? In a quiet, air-conditioned office near the center of town, one doctor revealed the reason. “The going rate for a crown here is $195,” he said. “In Austria, it’s closer to $800.” How about a bridge? $170, he added. But it’s not just a bottom-line decision that compels tens of thousands of patients to make a trip to Hungary. The dentists here are more experienced than their European counterparts, they claim, simply because they get more work.

Dentistry really has its teeth in this town. At Sopron’s welcome center, visitors are handed a free directory of local doctors. Giant tooth-shaped signs beckon prospective patients to check out one of the dental clinics, where walk-ins are welcome. Restaurants even specialize in softer foods for folks who are recovering from a root canal or an implant — mousse, cheesecake and ice cream are prominently featured on their menus.

The thriving dentistry business has aided in the restoration of Sopron’s archetecture. But you don’t have to have a toothache to appreciate Sopron. This is a town richer in history than most, with a remarkably diverse cuisine. And if you thought the dentistry was discounted, check out the other prices. True to its Eastern European roots, almost everything in Sopron is a bargain compared with elsewhere on the continent.

A family of four, for example, will have no trouble finding a quality restaurant where lunch costs about $35. The same meal would set you back $60 in Austria. Ditto for hotels. In Sopron, where most properties are maintained at Western European standards, room rates are about half of what they are in Western Europe. With all the money you save, you’ll probably have enough left over to get your teeth whitened.

The tooth trade has revitalized this historical city faster, and more noticeably, than other parts of Eastern Europe. Many buildings around Varkerulet Street — the thoroughfare encircling the inner city — have been restored to their former grandeur. And it’s not just the Gothic and Baroque styles, which are so common in this region, but also ancient ruins and buildings in the less common Jugendstil that you’ll find here.

Most visitors are immediately drawn to the Tuztorony, or Fire Tower, at the center of town. It dates back to the 13th Century and like so many other buildings, it stands on the remains of — you guessed it — Roman ruins. Tower guards used to keep watch over the city, sounding the alarm when invading armies approached or fire had broken out. To locals, however, the tower is a symbol of a 1921 referendum that made Sopron a part of Hungary.

There are other notable historical attractions, including a unique 14th Century synagogue on Uj Street that survived the banishment of Sopron’s Jewish population. It was restored to its original state in 1967, and is widely considered a must-visit because of its Gothic design and original pulpit.

What makes Sopron a truly worthwhile stop, even as a daytrip from Vienna or Budapest, is the food. Hungarian cooking is considerably heavier on the spices, a welcome break from the blander cuisine you’ll find in other parts of Europe. But it’s the city’s Austro-Hungarian heritage that gives it the sidewalk cafés, where you can order a mélange — a specialty drink of espresso and whole milk — and a kuchen. The cakes include the sinfully rich marble Gugelhupf and the decadent raspberry-filled Linzertorte.

Maybe it’s more than a little ironic that a place known for fixing teeth also appeals to your sweet tooth.

Christopher Elliott and Kari Haugeto