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.

So he played the four key chords of his track “Thinking out Loud”, ensuring that they were very different from those used in “Let’s Get it on” (1973), a soul classic sung by Marvin Gaye. Playing one then the other, he tried to demonstrate that the one on Marvin Gaye’s piece didn’t work for his song.

The British musician also told the court that he wrote his “Let’s Get it on” at home, with his regular musical partner Amy Wadge, in February 2014. “We sat down with our guitars,” he said, 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 hit was then ranked second on the Billboard Hot 100, the American reference ranking and won the Grammy Award for Best Song of the Year in 2016. The hearing is due to resume on Monday.