Sixteen years ago, music producer Tim “Timbaland” Mosley worked with Shawn “Jay Z” Carter on a track for the album Vol. 3… Life and Times of S. Carter.

At the recording session, Timbaland grabbed a CD that contained Middle Eastern music he believed to be in the public domain. He found a particularly distinctive Egyptian composition — the kind of song one might expect to be played for a belly dance. Timbaland focused on a particular measure of this song with an amazing flute melody and looped it. Jay Z’s rap (“You know I, thug ’em, f— ’em, love ’em, leave ’em”) came on top. And so “Big Pimpin” was created. Rolling Stone magazine has since called it one of the 500 greatest songs of all time.

When Jay Z’s hit came out, a foreign subsidiary of EMI identified the sample as coming from the Baligh Hamdy composition “Khosara, Khosara” from the 1960 Egyptian film Fata ahlami. EMI claimed rights stemming from a deal with an Egyptian outfit that had made its own agreement with Hamdy’s heirs. Timbaland then paid $100,000 to EMI for rights to use the sample, and that money was supposed to end any dispute. Except it didn’t.

Instead, what’s resulted is one of the longest-running active lawsuits in America — not just in entertainment. And it finally is scheduled to go to trial on October 13. Both Timbaland and Jay Z will testify, according to court filings submitted on Monday.