BERLIN — A hush fell over the hundreds of kinksters gathered in the pews of the Twelve Apostles Church in Berlin when the cellist, clad in head-to-toe black leather, took a seat in front of the altar and began to play Rachmaninoff.
At the back of the room, ushers from the nun-themed drag troupe The Sisters of Perpetual Indulgence, watched him, rapt.
When the cellist was done, a leather-clad organist played Johann Sebastian Bach’s Prelude in C major. He was followed by a quartet in chest harnesses and leather pants who performed Vivaldi’s Sonata in A minor. Then a towering baritone in skintight leather sang the hymn “Panis Angelicus” to cheers from the crowd.
Classic Meets Fetish was one of the opening events at Folsom Europe, a five-day festival of street parties, cultural events and bacchanalian club nights that draws thousands of tourists to what organizers describe as the fetish capital of Europe.
Politics was also an important ingredient in this year’s mix.
“I have been thinking about how much society has changed in the last few years,” the concert organizer, Tyrone Rontganger, told the audience. “We live in a society that has become polarized, but I have always believed that fetish unites, just as music brings people together.”
There are Folsom events each year in San Francisco, whose Folsom Street gave the festival its name and first location in 1984, and in New York. Public nudity and sex-on-the-sidewalk during the festival are not unheard-of at the San Francisco event, but New York tends to be a tamer affair.
Neither of the American versions, however, has the over-the-top reputation of Folsom Europe, which gets its carnal and cultural cachet from Berlin, a city whose vibrant year-round night-life draws everyone from gay sex tourists to British bachelorette parties.
The German capital — and Schöneberg, the neighborhood in which Folsom is held — is also deeply enmeshed in the L.G.B.T. history of the 19th and early 20th century, when the city was a center of gay culture and activism.
“Berlin has always been a very special city,” said Alexander Cabot, the first transgender man to win the title of Mr. Leather Berlin 2019. “Back in the 1920s, Berlin was called the city of sin. That is very appealing because you can experience a variety of things here — so many different things — and people like that. It is very free.”
That era of openness was brought to a violent end by the Nazis and did not re-emerge until decades later when West Berlin became a Cold War counterculture mecca.
Folsom’s organizers said they want to celebrate that hard-won freedom, but they also cautioned that Berlin’s anything-goes sexual reputation might be inaccurate.
“We are actually less scandalous than in San Francisco, I think,” said Daniel Ruester, a bursar for Lufthansa who co-founded the festival in 2003. He described it as “sexy but not sexual.”
“Tourists always think in Berlin you can do anything, but that is not true,” he added. “We do have laws here.”
The centerpiece of Folsom Europe is a street fair that turns Schöneberg into a sort of kinky catwalk, where thousands of elaborately dressed participants — mostly gay, bisexual and transgender men — drink, shop and show off their look.
At this year’s event, which took place last month, there was an abundance of uniforms — from the New York Police Department and the French Foreign Legion to the Canadian Mounties, along with rubber puppy masks and often formal-looking leather outfits that included jackets, ties and hats.
The sea of leather was occasionally interrupted by a burst of color and costuming: There was a man in a head-to-toe zebra outfit, including zebra-stripe heels, buying giant steins of beer; a scantily clad Pikachu winding his way through the crowd; and a Star Wars storm trooper waiting in line for the toilet.
Organizers remind visitors that the festival is governed by rules, which are displayed on posters across the neighborhood. Three of the most important: no public nudity, no public sex and no Nazi symbols, the display of which is strictly forbidden under German law.
“In the beginning, especially, sometimes Americans would come in S.S. uniforms, and it was always a big, big problem,” said Alain Rappsilber, a chimney sweep and a Folsom board member who described himself as “kink-free.”
(When asked his profession, he emphasized that being a chimney sweep was “not a fetish, it is actually my job.”)
The ban on Nazis appeared to be more widely respected this year than the prohibition on nudity and public sex, which became more loosely observed as the crowd got drunker and the afternoon turned to evening. Organizers said the people who act out each year tend to be tourists.
“Here in Berlin, people don’t need to go crazy because it is normal for us to have a beer in public or to walk around and see someone’s uncovered backside,” said Mr. Ruester, the festival co-founder.
Organizers said Folsom Europe has raised hundreds of thousands of dollars for causes across Europe, particularly in countries like Russia and Poland where the authorities have recently targeted L.G.B.T. people.
But it was founded, they said, out of a desire to celebrate gay life and the leather scene in Berlin, which has boomed in the years since the festival began.
In Schöneberg, gay bars have been joined by a crop of high-end fetish shops that sell bespoke leather outfits and $150 off-the-rack harnesses.
As with many things in Germany, the weight of history seemed inescapable even in the carnival atmosphere of Folsom, which was held just a few blocks from a memorial to the gay victims of the Holocaust.
The freedoms celebrated by the festival began to be carved out over 150 years ago, when German researchers coined the word “homosexuality” and began to discuss being gay not as a personal moral failing but as a naturally occurring phenomenon, according to the historian Robert Beachy.
Germany was also home to what Mr. Beachy argues may be the first public coming out, in the modern sense of the term, when the lawyer Karl Heinrich Ulrichs argued for the decriminalization of homosexuality before an 1867 gathering of the Association of German Jurists and in a series of pamphlets written under his real name.
Decades later, Schöneberg was a playground for luminaries like the bisexual singer Marlene Dietrich, the painter Otto Dix and the author Christopher Isherwood, who lived there when he wrote the novel that inspired the musical “Cabaret.”
The sexologist Magnus Hirschfeld, who founded the world’s first gay rights organization, also lived and worked nearby until his organization was ransacked by Nazis who forced him into exile.
The sense of partying atop a paradise lost suffused even the classical music concert. After the musicians took their bows, they joined the audience, which included a number of older men whose leather outfits were accessorized with canes, in a singalong.
The tune was a song by Dietrich, a Nazi critic who left Germany in the 1930s.
“I still have a suitcase in Berlin, that is why I must go back again,” the crowd sang. “The happiness of bygone days is all still in my suitcase.”