"Old Town Road" has been a breakout country-trap hit from 20-year-old rapper Lil Nas X.

He bought the beat for the song for $30 and it samples a Nine Inch Nails song.

Nine Inch Nails might have a claim to some of the song's royalties.

Visit INSIDER'S homepage for more stories.

If you're like the rest of the internet, you've probably been listening to rapper Lil Nas X's breakout country-trap hit "Old Town Road" on a loop since it rocketed to the top of the charts in April.

Part of its popularity comes from the fact that it sounds different from most anything else you've ever heard — is it country or is it trap? But as I learned today, which maybe won't surprise alternative rock fans, the beat isn't entirely unique. It's a sample of Nine Inch Nails' song "Ghosts IV", and now the band might have a claim to some of the royalties, according to Rolling Stone.

Lil Nas X bought the beat for just $30 from the website BeatStars, a marketplace where producers can upload beats and artists can purchase them.

Read more: How Lil Nas X's viral hit 'Old Town Road' was stripped from Billboard's Country chart and was later promoted by the company when he collaborated with Billy Ray Cyrus for a remix

YoungKio, a producer from the Netherlands, made the beat. He told The New York Times earlier this month that he can make up to 10 beats in one day. He said he'd never heard of Nine Inch Nails before he stumbled across the "Ghosts IV" song on YouTube.

"The banjos, you know, it really just hits you, that's why I made the track," he said.

Lil Nas X told The Times that he came across YoungKio's beat on Halloween night and it "was just speaking to" him.

"Old Town Road" blew up on the social media network TikTok and became fodder for memes all across the internet before it hit Billboard's country charts and was then yanked off because they claimed it wasn't country enough. The song has now been No. 1 on Billboard's Hot 100 for eight weeks.

But now that Lil Nas X is signed to Columbia Records, which is under Sony, it's likely that either he or his record label retroactively paid back royalties to either Nine Inch Nails or Trent Reznor, according to Rolling Stone.

"Ghosts," Rolling Stone reports, was released under a Creative Commons license, which gives "fans the ability to remix and redistribute the work from a multitude of different formats." The sample of the song was not initially cleared to appear on BeatStars or later in "Old Town Road."

Nine Inch Nails didn't respond to Rolling Stone's requests for comment, and it seems unclear whether they'll make a claim — possibly through a lawsuit — to any royalties from "Old Town Road." But the magazine notes that BeatStars doesn't guarantee whether producers that sell beats on the platform have claims to copyrights on sampled beats.