Ed Sheeran has reached a deal to end a 20 million dollar lawsuit over his hit song Photograph.
The British music star was accused of "note-for-note" copying from a track called Amazing, which was released by former X Factor winner Matt Cardle in 2012.
Songwriters Thomas Leonard and Martin Harrington sued the Thinking Out Loud singer, accusing him of "unabashedly taking credit" for their work.
They said Sheeran and his songwriting partner Johnny McDaid from Snow Patrol 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," they said in a complaint lodged in the US in July.
Harrington, who has written hits for Kylie Minogue, 5ive and Emma Bunton, sued for damages along with Leonard in excess of 20 million dollars (£16 million).
An order signed by judge James Selna at a California court on Monday said the case had been dismissed after an agreement had been reached between the parties.
Details of the settlement were not revealed in the court papers.
Sheeran's single Photograph, from his album x (Multiply), reached number 10 on the US Billboard Hot 100 and number 15 in the UK singles chart in 2014.
Cardle's track Amazing peaked at number 84 in the UK in 2012.
Leonard and Harrington were represented by Richard Busch, the lawyer who help ed the family of Marvin Gaye win a copyright infringement case in 2015.
Gaye's family successfully sued Robin Thicke and Pharrell Williams over their single Blurred Lines, winning a 7.4 million dollar (£5.96 million) settlement.