The rapper, real name Shawn Carter, and hip-hop producer Timothy 'Timbaland' Mosley are embroiled in a legal battle with Osama Ahmed Fahmy, who accused them of using the melody from his uncle Baligh Hamdy's 1957 song Khosara Khosara without permission.

Both hip-hop stars have denied the allegations, insisting they secured the rights to the Egyptian songwriter's composition to feature on their 1999 rap hit Big Pimpin'.

The legal battle has been rumbling on since 2007, but the trial finally began at the U.S. District Court in Los Angeles on Tuesday, with Carter in attendance.

His lawyer Andrew Bart argued the explicit lyrics of the song should not be discussed during the trial as they could be branded "vulgar" and "disgusting" and therefore prejudice the jury against the rapper.

U.S. District Court Judge Christina Snyder agreed, and ruled the song words would be irrelevant in the case.

However, Fahmy's attorney Peter Ross told the court the lyrics were the very reason why Carter avoided asking for permission before using Khosara Khosara.

Ross said, "You have to go to the composer himself, or his heirs, play the work, and get his approval... That, he never did."

Jay Z sat alongside his lawyers but did not speak during proceedings. He is due to testify on Wednesday (14Oct15).

The trial continues.