American pop singer Taylor Swift has reached an agreement with two songwriters to end the copyright lawsuit in which the duo claimed she lifted the lyrics to her 2014 hit song Shake It Off.

According to Variety, an American media company, Swift and songwriters Nathan Butler and Sean Hall have asked a judge to "[dismiss] this action in its entirety" after five years.

Variety has reported that from the filings, the terms of the settlement were unclear but the writing credits for the song were unchanged at the time. The trial was scheduled to begin next month.

In the lawsuit, Nathan and Sean alleged that Swift's song infringed upon Playas Gon' Play — a single from the group 3LW that peaked at No 81 on the Billboard Hot 100 in 2001.

However, Swift wrote in a filing that "until learning about the Plaintiffs' claim in 2017, I had never heard the song 'Playas Gon' Play', and had never heard of that song or the group 3LW".

She said she would have had little opportunity to hear it during its brief chart run, since her parents "did not permit me to watch [MTV's hit countdown show] TRL until I was about 13 years old."

Regardless of exposure to the tune, Swift and her attorney made the case that any similar phrasing is a result of the terminology being a part of everyday language.

According to Variety, they stated that it was part of the popular vernacular before Sean Hall and Nathan Butler wrote Playas Gon' Play.