Ed Sheeran may have a hefty legal battle on his hands. The Thinking Out Loud singer is being sued for $20m (£13.8m, €17m) over claims that his 2015 single Photograph was copied from a song released by X Factor winner Matt Cardle. It could be an uphill struggle for Sheeran as the defendants are being represented by the lawyers who successfully won the Blurred Lines copyright lawsuit on behalf of Marvin Gaye's family.

Songwriters Martin Harrington and Thomas Leonard wrote Amazing in 2009 and it was then recorded and released by Cardle, 33, in 2012, featuring on his debut studio album Letters. In their lawsuit, Harrington and Leonard claim Sheeran's Photograph, which was released as a single in 2015, bears the same musical composition to their song.

The musicians have produced documents detailing the chord breakdowns of both songs and allege that Photograph carries 39 "identical" notes matching those on Amazing. In the lawsuit, the plaintiffs accuse Sheeran and Johnny McDaid, who co-wrote Photograph, of "participating in a scheme aiding, inducing, and contributing to copyright infringement in the US."

Harrington and Leonard also state that the "defendants benefited substantially from the sale of a substantial number of copies of the infringing works in California. Defendants licensed and/or authorised the licensing of the infringing works with California companies and for exploitation in California, including but not limited the licensing of the Infringing Works in at least one major motion picture just recently released."

Sheeran and McDaid are also alleged to have "copied, and exploited, without authorisation or credit, the work of other active, professional songwriters, on a breathtaking scale, unabashedly taking credit for the work of these songwriters by claiming it to be their own".

Listen to Ed Sheeran's Photograph:

The court documents also list the commercial success of Photograph, which the plaintiffs say has sold in excess of 3.5 million copies worldwide and was certified multi-platinum twice in the US after selling two million units. Photograph features on Sheeran's chart-topping second album x (Multiply), which had sold more than 10 million copies as of August 2015. The ballad enjoyed an increase in popularity after appearing on the soundtrack for the film Me Before You, a rom-com starring Game Of Thrones actress Emilia Clarke, released on 3 June 2016.

Who are Martin Harrington and Thomas Leonard?

Martin Harrington is a British songwriter who has penned tracks for the likes of Stevie Wonder, Celine Dion, Westlife, Kylie Minogue, Emma Bunton.

Thomas Leonard hails from the US and has worked with a range of artists including Backstreet Boys and Echosmith.

Harrington and Leonard are being represented by the same legal team, who successfully won a lawsuit on behalf of Marvin Gaye's family against Robin Thicke and Pharrell Williams over their single Blurred Lines. In 2015, Gaye's estate were awarded $7.4m in damages.

The Amazing songwriters and their publishing company HaloSongs are demanding royalties from Photograph, a trial and damages of more than $20m. Cardle won The X Factor in 2010 and has since released three albums and two top 10 singles including his number one debut When We Collide, a cover of Biffy Clyro's Many Of Horror.

Earlier in June 2016, Sheeran was named the most-played artist in the UK of 2015 by Phonographic Performance Ltd following the release of his album x. The Don't singer is currently taking a break from music but is expected to debut new songs later in 2016.

Listen to Matt Cardle's Amazing: