Ed Sheeran is finally putting his legal drama completely to bed.

In April, the singer won a lawsuit against him, accusing him of plagiarism on his 2017 smash hit “Shape of You”, and now he’ll be having his legal costs covered, the BBC reported.

READ MORE: Ed Sheeran Is ‘Going Back’ To Daddy Duties Following Platinum Jubilee Performance

A London court at the time had ruled that Sheeran “neither deliberately nor subconsciously copied” a 2015 song called “Oh Why” by artist Sami Switch.

The legal battle, which also named Sheeran’s co-writers Steve McCutcheon and Johnny McDaid, had been ongoing for years, with songwriters Sami Chokri and Ross O’Donoghue claiming their track was ripped off.

Following the ruling, the battle continued over whether Sheeran would have to pay his own legal costs in the suit, but on Tuesday, a judge awarded the artist and his co-writers $1.12 million for legal costs.

READ MORE: Ed Sheeran Celebrates The Birth Of His Daughter With New Track ‘Welcome To The World’

Arguing that Chokri and O’Donoghue didn’t provide necessary documentary and demonstrated “awkwardness and opacity,” the judge said, “I consider it is appropriate that the claimants’ success is reflected in an order that their costs are paid by the defendants, without reduction save for that which is made as part of the process of detailed assessment.”