Grammy Award-winning songwriter Ed Sheeran has won a U.K. copyright battle over the 2017 hit “Shape of You.”

The British pop star and his co-writers, Snow Patrol’s John McDaid and producer Steven McCutcheon, had denied allegations that the 2017 song copied part of 2015′s “Oh Why” by Sami Chokri, who performs under the name Sami Switch.

READ MORE: Camila Cabello, Ed Sheeran Give First Performance Of ‘Bam Bam’ During Ukraine Relief Concert

Sheeran and his co-writers said they did not remember hearing “Oh Why” before the court case.

In a ruling on Wednesday, Judge Antony Zacaroli concluded that Sheeran “neither deliberately nor subconsciously” copied a phrase from “Oh Why″ when writing his smash hit.

READ MORE: Ed Sheeran Sings Nina Simone Track In Court As He Continues To Defend ‘Shape Of You’ In Copyright Case Battle

“Shape of You” was the biggest-selling song in the U.K. in 2017.

Sheeran, who is “happy with the result,” later took to Twitter to update fans with a video message.