Ed Sheeran has struck a deal to end a $20m (€18m) copyright infringement claim over his chart-topping track Photograph.
Songwriters Thomas Leonard and Martin Harrington sued the British star last June, accusing him of "note-for-note" copying from their track Amazing, which was released by former X Factor winner Matt Cardle in 2012.
On Monday, an order signed by a judge at a California court said the case had been dismissed after an agreement had been reached between both parties.
Details of the settlement have not been revealed.
In court papers lodged last year, Leonard and Harrington alleged that Sheeran and his songwriting partner, Snow Patrol's Johnny McDaid, had "copied and exploited, without authorisation or credit, the work of other active, professional songwriters on a breathtaking scale".
"This copying is, in many instances, verbatim, note-for-note copying, makes up nearly one half of Photograph, and raises this case to the unusual level of strikingly similar copying," a complaint from the songwriting duo read.
They claimed that the chorus of the two songs shared 39 identical notes and included chord structures for both tracks in court documents.
Matt Cardle previously distanced himself from the case, saying: "This is not my lawsuit. I think Ed Sheeran is a genius and 100 per cent deserves all his success."
Amazing was the third single released by the 2010 X Factor winner but only made it as far as No 84 in the UK chart.
On the other hand Photograph - the video of which features clips of a young Sheeran busking in Galway - has sold more than 3.4m copies worldwide.