Will.i.am has been forced to credit British popstar Tulisa Contostavlos as a co-writer of Britney Spears' hit Scream & Shout after a five year legal battle.

The former X Factor U.K. judge claims she co-wrote the chart-topping 2012 track, which featured Will on vocals and was the Toxic singer's first U.K. number one in eight years.

Tulisa penned an early iteration of the track titled I Don't Give A F**k for her solo album The Female Boss, but only Will.i.am, producer Jef Martens and co-writer Jean Baptiste were credited on a version reworked for Britney.

According to editors at the Daily Mail, Tulisa is now set for a bumper payday as she has been awarded 10 per cent of the worldwide publishing rights and income from the song after her publishers Sony ATV successfully sued Will's, BMG.

"Tulisa was annoyed when the song was taken from her and given to Britney - especially as she co-wrote it," a source told the U.K. newspaper. "It was set to be one of the big songs on her debut album. She didn't let it lie, and took it all the way to the courts and has now won. She just wanted to be recognised as the writer of one of the biggest pop tracks of the last decade."

Will, real name William James Adams Jr., has previously confessed that the former N-Dubz star played a role in conceiving the song, but said Jef, who also produces alongside his brother under the name Lazy Jay, thought it better suited Britney.

"Tulisa wrote to that song before I did - this is the truth," he told MTV. "But the producers of the beat - two brothers from Belgium called Lazy Jay - didn't want her to have it, so I wrote to it and Britney is the only person I ever had in mind."

Tulisa claimed that the new version still included her contributions including the key lyric, "When you hear this in the club, you'd better turn this s**t up" and submitted a musicologist report alleging her original vocals can still be heard underneath Britney's.

The money due to the songwriters was frozen in 2012, but has now been released so Tulisa can claim her 10 per cent.

LATEST NEWS