An independent Montreal rapper says he feels vindicated after winning a legal battle that pitted him against major record companies representing one of the world's top hip hop artists.

A Quebec small claims court has ordered Top Dawg Entertainment, Interscope Records and Universal Music Group to pay Jonathan Emile $8,000 in damages for pulling the lead track from his debut album off the internet last year.

The labels claimed Emile's song Heaven Help Dem infringed their copyright because it included verses from hip hop giant Kendrick Lamar.

While the payout itself is peanuts for a major music label, Emile is pleased with the outcome.

"It doesn't feel like a victory for me because it was definitely not a great situation, but there is some vindication," he told CBC Montreal's Daybreak.

"I'm able to say I did what I was supposed to do, and sometimes, even though you do everything right, the outcome doesn't fall the way you'd like it to."

Emile, Kendrick Lamar, and the labels

The saga began with a phone call to a fellow artist years ago.

Emile initially drew inspiration for Heaven Help Dem from the death of 18-year-old Fredy Villanueva, who was shot and killed by Montreal police in 2008.

In 2011, he asked fellow hip hop artist Kendrick Lamar to collaborate with him on the track. Lamar was on the verge of signing a deal with Dr. Dre's label Aftermath.

Lamar agreed, and delivered his verse in 2012. Emile paid him for it, he says.

Kendrick Lamar's star was on the rise when Montrealer Jonathan Emile asked him to collaborate on a track a few years ago. (Gustavo Caballero/Getty Images)

Emile says he and his team made it clear from the beginning that the song would be on his debut album, but after the verse was delivered it became harder to contact Lamar's management to finalize the deal.

Emile said he released the song as his lead single based on the original agreement with Lamar's management.

In 2015, with the album, titled The Lover/Fighter Document, complete, he was gearing up to release the single and start promoting his work. By that time, Lamar had become a critically acclaimed, Grammy award-winning artist.

The song was posted on iTunes, YouTube, SoundCloud and other streaming services. But soon, it was gone.

A 'disappointing' situation

He received a message from Lamar's label last year saying that the song would be pulled down for copyright infringement.

"I think the whole situation was disappointing. Ultimately, what was created was a situation where nobody wins, which is the exact opposite of what I was hoping for," he said.

He was able to get it posted online again months later, but by that point the momentum he'd built had died. He ended up delaying the album's release date.

The release of Jonathan Emile's debut album The Lover/Fighter Document was delayed after the lead single was pulled from the internet. (Submitted by Jonathan Emile)

Emile assembled a legal team and took the case to Quebec's small claims court, which handed down the judgment in his favour last month.

He didn't plan to publicize the news, he says, but word of his David and Goliath-esque battle got out.

Emile said it's a shame the discussion he intended to spark with the song was overshadowed by a different kind of controversy.

"The conversation I wanted to have was about social justice and what ended up happening is a story about how major labels treat independent artists," he said.

Listen to the song: