Ham with brie, wild mushroom croquettes, cured-meat ravioli: gourmet cooking has put this Basque town on the gastronomic map, drawing visitors from around the world, AFP reports.
Now its culinary assets -- which include more Michelin stars per square metre than anywhere else in the world, and the world's first university of gastronomy -- are nourishing it in the economic crisis.
"Gastronomy is a tourist attraction of growing importance" for the region, said the director of the Basque Culinary Center gourmet university, Joxe Mari Aizega. "We are looking to become part of the economic attraction."
In a 2011 survey by the Basque Country regional government, seven out of 10 visitors said they were drawn there by the food.
More than 1.5 million tourists visited the region this year up to August -- its second best year on record -- but the number of Spaniards among them fell compared to previous years while the number of foreigners rose.
Many of them come to the bars of San Sebastian's old town, where Japanese and US tourists sample "pintxos", the region's trademark bite-sized canapes.
The foreign visitors are helping keep the restaurants in business while Spaniards are spending less at a time of high unemployment and budget cuts.
"Visitors from the rest of Spain have got slightly fewer, but at the same time we are making up for it with foreigners," said Amaiur Martinez, a joint owner of the Ganbara bar.
"A lot of them come from France, as well as from Asia, the United States and Britain," he told AFP, standing behind a counter piled with mushrooms, seafood and various pintxos.
"The Asians are most interested in the seafood and how it is prepared. The French are very interested in the mushrooms."
Chefs in San Sebastian, which include names such as Martin Berasategui, Pedro Subijana and Andoni Luis Aduriz, have 16 Michelin stars between them.
The Basque Culinary Center, launched last year, counts among its expert participants Ferran Adria, the Catalan master whose former restaurant El Bulli was hailed as the best in the world, and the French chef Michel Bras.
"This centre's basic mission is to act as a reference in advanced knowledge of gastronomy with an international vision," Aizega told AFP.
Students on the four-year course learn everything from soups to avant-garde dishes as well as studying the science of cooking with test-tubes, management and business skills, with work placements in top eateries worldwide.
"Every day they teach us tricks and little tips that help us make the dishes much better," said Esteban Yebes from Colombia, one of the students working at long tables here in their white aprons and hats.
"For example, how to shock beans by adding a bit of cold water while they're boiling."
For Spaniards struggling to find work in the recession, the centre's world-class training offers a strong guarantee of a job on leaving.
"I studied business administration and management, but I could find no work," said one student, Lolo Roman, 29, from the Canary Islands, cooking beans in the training kitchen.
"I had always liked cooking so I decided to come here."
"We have no doubt they will find work. There are some who get offered work after studying here for one year," said Aizega. "Gastronomy will continue to have its place here and keep innovating."