Image copyright Getty Images Image caption Eminem's song Lose Yourself appeared in his 2002 film, 8 Mile

Eminem has taken New Zealand's governing party to court over a music track it used for a campaign ad.

The US rapper says the song, used in the 2014 advert by the National Party, was an unlicensed version of Lose Yourself, one of his biggest hits.

But the party's lawyers argue it was not actually Lose Yourself, but a track called Eminem-esque which they bought from a stock music library.

The case began on Monday, with the two tracks played in court.

A lawyer for Eight Mile Style - a publishing group representing the artist - said Lose Yourself was "iconic" and "without doubt the jewel in the crown of Eminem's musical work".

Image copyright National Party

The 2014 advert featured shots of rowers and a voiceover urging people to "keep the team that's working" and return the National Party to office at the coming election.

The backing track, Eminem-esque, was strikingly similar to Lose Yourself, which appeared in Eminem's 2002 film 8 Mile.

It had the same insistent driving rhythm, though did not feature any words.

The track had been taken from a library made by production music company Beatbox.

Songs which sound similar to famous tracks - but different enough to avoid breaching copyright - routinely feature in free-to-use commercial music libraries.

But Eight Mile Style lawyer Gary Williams said the use of the song had been a breach of copyright.

He told the court that emails showed some in the National Party campaign team had raised copyright concerns at the time, but decided the composer, not them, would be liable.

That was "just wrong, in law" Mr Williams said, according to the New Zealand Herald.

Mr Williams said permission had only very rarely been given for use of Lose Yourself.

"When licensed, it can command in the millions of dollars. That's how valuable it is," he said.

The National Party denies being responsible for any copyright infringement.

Defence lawyer Greg Arthur said copyright was "not in any way proven by the name given to a piece of music".

The case is expected to continue for six days.