After decades of lame jokes and put-downs, insults and polka-powered stereotypes, accordion players are getting the last laugh. Slowly but surely, the much-maligned instrument has gone from ridicule to the cool school, as musicians and music fans have come to embrace its versatility and singular sonic characteristics.

On the West Coast, no institution has played a more important role showcasing the squeezebox in all its aurally polymorphous glory than the Cotati Accordion Festival, which on Saturday and Sunday will celebrate its 25th season. Unfolding on several stages set up around La Plaza Park in the laid-back Sonoma County town of Cotati, the Accordion Festival presents dozens of acts, from deep-in-the-tradition roots music to uncategorizable new music and everything in between. Friday features a number of prefestival events, including the stylistically omnivorous Mad Maggies at Lagunitas Brewing Company and a benefit for student accordion scholarships at Redwood Café.

Cotati created the event in response to a county effort to promote its cultural diversity. What seemed quaint and countercultural in 1991 now looks prescient, as the accordion has broken out of ethnic music parameters and found a home in jazz, indie rock and even punk. Among the artists featured this year are Parisian-born, Los Angeles-based accordionist/vocalist Jessica Fichot, who plays French chanson and Shanghai swing, and cowboy troubadours Sourdough Slim and Robert Armstrong, who are devoted to pre-World War II country blues and string band music.

“We’ve always been billed as a multicultural, multigenerational extravaganza,” says Linda Conner, who took over as the festival’s executive director this year after playing various festival production roles since the first season. “We have a polka tent. We have a separate off-site zydeco venue, and we have an Accordion Apocalypse Stage with people on unicycles with tattoos and piercings.”

When Conner was hired to do graphics for the first festival in 1991, she didn’t know much about the instrument. “What I knew was accordion jokes,” she says. The teasing put-downs directed at the instrument (example: The definition of a gentleman is someone who can play the accordion, but doesn’t) cast it as something uncouth and a little embarrassing, which actually makes sense when you consider the way the accordion is intimately tied to immigration and the evolution of American identity in the 20th century.

The instrument became a cultural force in the United States when it arrived with waves of Southern and Eastern Europeans from the 1880s through the mid-1920s (when the Immigration Act of 1924 largely shut America’s front door). The prevailing ethic of assimilation meant leaving the clothing, language and music of the Old World behind. Children and grandchildren of immigrants often distanced themselves from their European roots, which were considered supremely uncool (a similar dynamic played out among African-Americans moving from the rural Gulf Coast to urban centers in the Northeast, Midwest and West Coast).

Julie Caine, a cultural reporter who co-directed the public radio documentary “Sqeezebox Stories” about the accordion’s social history and musical variation in the U.S., sees the instrument as a leading cultural indicator that tracks with the evolution of the ideal of the melting pot to the rise of multiculturalism.

“I think the accordion is a great way to understand the way assimilation has changed, and Lawrence Welk is a good metric,” Caine says. “He’s a first-generation American who still had an Old-World accent. He mainstreamed Old World and black music and brought it to television, where you assimilate so much that all we are is bland white bread.”

By the 1970s, the grandchildren of immigrants started reclaiming their heritage, starting with movements to revive klezmer and Cajun music. And with the rise of multiculturalism in the 1980s, recent immigrants had more room to hold on to the sounds of their homelands, particularly in Mexican norteno music.

“People felt, I want my ethnicity and heritage,” Caine says. “I want to have a story, and the accordion is a really good vehicle for that. It’s a really unusual instrument in that it’s everywhere: Africa, the Middle East, South and Central America. It’s huge in China and Korea.”

Cotati embraces the entire accordion spectrum, with traditional music slated for earlier in the day and more experimental sounds featured in the afternoon. The welcoming vibe means that artists are eager to come back year after year, while the programmers are always looking for fresh acts.

“I love how diverse the bands are, and the atmosphere is so laid-back,” says accordion player and festival veteran Fichot, who performs Saturday at the festival and at 8 p.m. Friday with her quartet at San Francisco’s Red Poppy Art House ($10-$20; http://redpoppyarthouse.org). “No matter where I am touring in the U.S., when I say I play the accordion, people will ask, ‘Do you know about Cotati?’ People everywhere have heard of it.”

More in News

San Francisco’s police chief apologized on Friday for raiding a freelance journalist’s home and office to find out who leaked a police report into the unexpected death of the city’s former public defender.

A leading mortgage settlement and title insurance company, First American Financial Corporation, left hundreds of millions of customer records accessible on the web, including personal information such as Social Security numbers, according to a report on a security blog Friday.

Marijuana is legal in California -- but the lofty goals of Prop. 64 remain only partially filled, deferring the dream of funding major new state-run social programs. Our analysis finds that some counties and cities show great success, though, in putting new funds to good use.