Rapper Nicki Minaj will pay singer Tracy Chapman $450,000 (£332,000) to settle a copyright dispute after sampling one of her songs. Chapman sued Minaj in 2018, saying she had used portions of Baby, Can I Hold You Tonight in her song Sorry.

Although the song was never released, a leaked version made its way to radio DJ Funkmaster Flex and went viral online. Chapman accused Minaj of sharing the song with Flex, although both have denied that version of events.

Minaj wrote Sorry with fellow rapper Nas while she was recording her fourth album Queen in 2018. It was based on a sample of the dancehall track Sorry by Jamaican artist Shelly Thunder. Unbeknownst to Minaj, that song was based on Baby, Can I Hold You Tonight, from Chapman's Grammy-winning 1988 debut album.

After discovering the connection, Minaj and her record label sought permission to use Chapman's composition, but the singer-songwriter repeatedly refused. The singer's lawyer said she has a blanket policy against granting such permission. One of the clearance specialists working for Minaj was also said to have known Chapman was on an unofficial "do not sample" list.

In an earlier judgement, US District Judge Virginia A Phillips ruled that Minaj's experimentation with Chapman's song in the studio constituted "fair use". In doing so, she sided with the rapper's lawyers, who argued that artists need to be free to sample music while writing and recording, without worrying about being sued once they approach the rights-holder for a licence.

"Such free-flowing creativity is important to all recording artists, but particularly in hip-hop," Minaj's team argued. "With that category of music, a recording artist typically goes into the studio and experiments with dozens of different 'beats' or snippets of melodies, before hitting upon a pleasing combination."

Judge Phillips agreed that "a ruling uprooting these common practices would limit creativity and stifle innovation within the music industry". She added that there was "no evidence" that Minaj's song "usurps any potential market for Chapman" and her original song, a searingly personal guitar ballad.

However, the judge set up a trial to explore how Sorry came to be leaked and distributed, and whether that constituted copyright infringement. That trial will no longer take place after Chapman accepted Minaj's offer. The settlement includes Chapman's costs and legal fees to date, according to documents made public by the California Central District Court.