British pop star Ed Sheeran is not liable in a copyright infringement lawsuit that accused him of taking parts of the melody from Marvin Gaye’s soul classic «Let’s Get It On» in his own hit «Thinking Out Loud,» he decided a jury on Thursday.

The jury reached a unanimous verdict, a requirement in the case, after just under three hours of deliberations.

Sheeran stood up and hugged his lawyers as the verdict was read, with his wife, Cherry Seaborn, and «Thinking Out Loud» co-writer Amy Wadge crying.

Jurors said Sheeran created the song independently, outweighing all other decisions they had to make to determine whether he had infringed copyright.

Speaking outside court, Sheeran said: «Obviously I’m very happy with the outcome of the case, and it looks like I won’t have to retire from my day job after all.»

He said he was at the same time «frustrated» by the «unsubstantiated claims». He praised the jury’s decision, noting that it will allow composers to continue to have artistic freedom.

Sheeran spoke about the cost of the trial, saying that being in New York for the trial caused him to miss his grandmother’s funeral in Ireland.

“Like artists around the world, Amy and I work hard to independently create songs that are often based on real life and personal experience. It’s devastating to be accused of stealing someone else’s songs when we put so much work into our livelihood,» she said.

«I’m just a guy with a guitar who loves to write music for people to enjoy. I am not and will never allow myself to be a piggy bank for anyone to shake,» Sheeran added.

His lawyer, Ilene Farkas, said: «I hope today’s ruling gives songwriters more peace of mind so they can continue to create great music using the building blocks that were at stake in this trial with a little less fear of lawsuits on their side.» against».

The plaintiffs declined to make a statement outside of court following the verdict. NBC News has reached out to the attorneys for comment.

The trial began in Manhattan federal court on April 25 and saw the 32-year-old singer take the stand, pick up his guitar and sing for the jury.

The case stemmed from a lawsuit filed in 2017 by the estate of Ed Townsend, Gaye’s co-writer. He said Sheeran’s 2014 hit «Thinking Out Loud» has «striking similarities» and shares «overt common elements» with Gaye’s 1973 copyright-protected record «Let’s Get It On.»

Ed Sheeran leaves Federal Court in New York
British singer Ed Sheeran leaves federal court in New York on April 25.Fatih Aktas/Anadolu Agency via Getty Images file

Sheeran said that he came up with his song together with Wudge after his grandfather died. The song is about finding love in old age, he told the court.

At trial, Sheeran was questioned about a live mix of the two songs in question recorded in a video clip from a Zurich concert. Attorney Ben Crump, who represents Townsend’s estate, called the clip a «smoking gun» and proof that he was infringing copyright.

Sheeran argued that he has mashups his other songs, saying, «If I did what they accuse me of, I’d be an idiot to stand up in front of people.»

Townsend’s daughter, Kathryn Townsend Griffin, also took the stand, saying she had never heard of the British singer before «Thinking Out Loud.» She said she did not want the case to go to trial, «but I have to protect my father’s legacy.»

The case was not the first time Sheeran has been embroiled in a copyright infringement lawsuit. He won another copyright infringement case last year in the US that centered on her hit «Shape Of You.»

In 2015, the estate of Marvin Gaye won a copyright infringement lawsuit against Robin Thicke and Pharrell Williams over the 2013 song «Blurred Lines», which they claimed violated the copyright of Gaye’s 1977 song «Got to Give It Up». Gaye’s estate was not involved in Sheeran’s current lawsuit.

The Associated Press contributed.