In May, Washington go-go band Trouble Funk took rap pioneers the Beastie Boys to court and didn’t even know it.

Trouble Funk’s publishing company, Tuff City, claimed that the group’s tunes were illegally sampled on the first two Beastie Boys albums, “License to Ill” and “Paul’s Boutique.” Trouble Funk’s signature anthem, “Drop the Bomb,” starts with two tumbling drum fills. The Beasties had cut them out and transplanted them into their songs. Now it was time to pay up.

But Trouble Funk leader “Big Tony” Fisher had no idea that this meant going after the Beastie Boys. He told me that he didn’t even know the Beasties had sampled his music. The two groups had toured together in the 1980s. He liked them. On top of that, Tuff City’s timing was nightmarishly bad. Founding Beastie Boys member Adam “MCA” Yauch died of cancer the day after the lawsuit was filed in White Plains, N.Y.

Lawsuits like these aren’t just courtroom showdowns that force producers to pay off musicians and their record companies. With little regard for the hip-hop community and how producers use vintage recordings to craft new music, the law has changed the sound of the genre forever. Today, if you want to sample — just as Kanye West does in his recent chart-topper “Mercy” — you need to be able to afford it.

Tuff City’s suit can be traced to a 1991 U.S. District Court case — Grand Upright Music, Ltd. v. Warner Bros. Records Inc. — that made artists responsible for getting the thumbs-up from the musicians they sampled. Goofball rapper Biz Markie was at the center of the case after he sampled soft-rocker Gilbert O’Sullivan’s “Alone Again (Naturally)” for his song “Alone Again.”

No court decision has changed the sound of pop music as much as this, before or since. Before the ruling, albums such as Public Enemy’s “It Takes a Nation of Millions to Hold Us Back” and De La Soul’s “3 Feet High and Rising” became hip-hop landmarks with the help of dozens upon dozens of samples. By assembling snippets of sound into dizzying new configurations, these recordings defined an era.

Then the courts made the building blocks that formed those songs prohibitively expensive. A new genre’s sonic signature had, more or less, been outlawed. Imagine a court ruling that banished the saxophone. Or the wah-wah pedal. Or the ukulele.

Sampling didn’t go extinct. Five years after the ruling, California’s DJ Shadow released “Endtroducing. . . . .,” a widely celebrated album made almost entirely from samples. His approach: Sample obscure recordings and hope you don’t get caught. There were some easily recognizable clippings — “Mutual Slump” sampled Bjork’s “Possibly Maybe,” for instance — that needed clearance, but much of the album’s source material remains a mystery.

Other producers emulated the sampling ethos of “Endtroducing. . . . .” but they have been exceptions. Instead, major-label artists have largely played by the rules, sampling sparingly. A drum break here. A James Brown grunt or a Chaka Khan chorus there. Nothing that would require an arsenal of lawyers. In the 2000s, super-producers Timbaland and the Neptunes took the lead in hip-hop, forging their own futuristic sounds instead of scrapbooking recognizable hooks from the past.

Today, some producers use samples to advertise their wealth. West’s catalog, for example, has tapped into the avant-garde rock of King Crimson and the electronic pulse of Daft Punk. West flaunts his samples the same way he flaunts his cars, his clothes, his jewelry and his art collection.

The first single from “Watch the Throne,” West’s 2011 collaboration disc with Jay-Z, included a sample that was anything but subtle. Dubbed “Otis” because it sampled the voice of the late soul icon Otis Redding, the song was even labeled “featuring Otis Redding,” as though Redding had collaborated with the rappers on the track. And although West’s creation sounded cool, the overriding message was, “This cost me a lot of money.”

Once hip-hop’s foundation, the sample has become a trophy.

“With sampling, it’s now become . . . for the elite,” Hank Shocklee says in the forthcoming documentary, “DUST: The Art of Sampling.” His work with Public Enemy in the late ’80s and early ’90s made him an innovator before sampling was closely regulated. “Jay-Z and Kanye can afford to pay the sample rates, but not the kids starting out in their own little home studio in their house,” Shocklee says. “And that, to me, is what’s holding back creativity.”

He’s right and he’s wrong. No doubt, the law has taken a powerful tool from musicians, but it also has forced musicians to adapt and innovate. For the past 20 years, those young producers have kept hip-hop on the pop-music vanguard — proof that no court decision can regulate the imagination.

Chris Richards is The Washington Post’s music critic.