Pharrell Williams has appeared in court to testify in the copyright case with the Marvin Gaye estate over the Robin Thicke hit "Blurred Lines".

The star is embroiled in a legal battle with Gaye's family, who claim that the track, which he wrote for Thicke, is a rip-off of the 1977 hit "Got To Give It Up."

Williams stated that he was inspired by country music he was writing for pop star Miley Cyrus at the time and claims that Gaye's song "never entered his head" during recording, reports NME.

"I must have been channelling that feeling, that late '70s feeling. Sometimes when you look back on your past work, you see echoes of people. But that doesn't mean that's what you were doing," the site reports him as saying.