SEVILLE, Spain — Since its founding 127 years ago, the Fernández y Roche factory on the edge of this Andalusian capital has weathered every crisis known to hatters.

It surmounted the 1930s “hatless” trend that eschewed fedoras. It survived the sliding popularity of the birettas and saturnos worn by Roman Catholic priests. And, now, it is weathering a decline in Spanish sales of the most elemental symbol of Andalusia, the stiff-brimmed cordobés hat favored by horseback riders and the occasional bullfighter.

But despite the Spanish economic crisis, the hat company is thriving, thanks to an unlikely revenue base: the sales of thousands of black hats each year to Satmar Hasidic Jews in Jerusalem and Brooklyn.

“They are saving us in the crisis,” said Miguel García Gutiérrez, 35, the managing director of the Roche factory, officially known as Industrias Sombrereras Españolas, which operates in an industrial park in Salteras, about nine miles outside Seville. “We have an important market in Spain for traditional hats, but with the crisis those sales have fallen for the last three years, between 20 and 30 percent. But our exports are rising for hats for Orthodox Jews.”