(New York) British pop star Ed Sheeran sang with his guitar on Thursday in a New York court to defend himself for plagiarizing a song by American Marvin Gaye, US media report.

For the second time in a year, the 32-year-old singer and songwriter has to face charges of plagiarism in his globally successful songs.

After winning a trial in London last year, he is defending himself this time against accusations from the heirs of Ed Townsend, an American musician and producer who co-wrote Let’s Get It On with Marvin Gaye. The hearing opened earlier this week in Manhattan.

Quoted by the prosecution, a musicologist said Thursday that the chord progression present on the two songs was almost similar – which prompted the Briton to take out his guitar in the courtroom, says the New York Times.

He therefore played the four key chords of his song Thinking Out Loud, ensuring that they were very different from those used in Let’s Get It On (1973), classic soul sung by Marvin Gaye.

Playing one then the other, he tried to demonstrate that the one in Marvin Gaye’s piece did not work for his song.

The British musician also told the court that he wrote his Let’s Get It On at home, with his usual musical partner Amy Wadge, in February 2014.

“We sat down with our guitars,” he said, as quoted by ABC News, “we wrote a lot together.”

The singer remembers getting out of the shower and hearing a few Amy Wadge chords elsewhere in the house. “I remember thinking, ‘We’ve got to do something about this’.”

Ed Sheeran’s success was then ranked second on the Billboard Hot 100, the American benchmark ranking and won the Grammy Award for best song of the year in 2016.

The hearing is due to resume on Monday.