Ed Sheeran has reached an agreement to end a $20m copyright claim over his song 'Photograph'.

The chart-topping singer was sued by songwriters Thomas Leonard and Martin Harrington in June 2016, with the duo claiming Ed's hit single had a strikingly similar structure to their track 'Amazing', which was released by Matt Cardle in 2012.

The songwriters argued in court that the tracks shared 39 identical notes, with similarities ''instantly recognisable to the ordinary observer''.

And on Friday (07.04.17), papers were filed dismissing the case with prejudice, with the BBC reporting that a California federal court would enforce the terms of the settlement.

However, Richard Busch, who represented Harrington and Leonard during the case, has refused to comment on the precise terms of the agreement.

Last year, Matt Cardle took to Twitter to clarify he was not involved in the lawsuit and to express his admiration for Ed, saying the 26-year-old star was a musical ''genius''.

Matt, who was the UK 'X Factor' winner in 2010, wrote: ''Please read news articles closely. This is not my lawsuit. I think Ed Sheeran is a genius and 100 percent deserves all his success.''

Meanwhile, in 2015, Robin Thicke and Pharrell Williams were ordered to pay $7.3 million in copyright infringement due to similarities between their number one single 'Blurred Lines' and Gaye's 'Got To Give It Up'.

However, both Robin and Pharrell denied any wrongdoing.

Their lawyer, Howard King, said at the time: ''We owe it to songwriters around the world to make sure this verdict doesn't stand.

''My clients know that they wrote the song 'Blurred Lines' from their hearts and souls and no other source.

''We are going to exercise every post trial remedy we have to make sure this verdict does not stand. We look at it as being in the seventh inning of a game that could go into extra innings.''

The payout was reduced on appeal, but the Marvin Gaye estate receives 50 percent of publishing and songwriting revenues from 'Blurred Lines'.