Taylor Swift has prevailed in a $1 million lawsuit against a realtor.

A federal court judge has sided with the 29-year-old singer after a real estate broker from company Douglas Elliman claimed she owed $1 million in commission after she bought an $18 million New York townhouse in 2017, according to The Blast.

But the judge has thrown out the case after the estate agent failed to provide enough evidence to support his allegations.

It was ruled that an email from an employee to one of the 'Shake It Off' singer's representatives didn't demonstrate she had agreed to pay a seven-figure commission fee, nor that she was planning to use the broker exclusively.

This comes after Douglas Elliman had sued Taylor's Firefly Entertainment firm for $1,080,000 in what they claimed was unpaid commission, alleging she had ''wrongfully excluded'' the company from the house purchase.

But Firefly filed a motion to dismiss the suit, claiming the company was ''seeking commissions for real estate transactions in which it had little or no involvement''.

The court document added: ''In keeping with this pattern, through this action Douglas Elliman seeks more than a million dollars for a real estate transaction in which it does not claim to have played any material role.''

Taylor's company said the agent had arranged one viewing and provided basic information about the abode, but didn't contact the 'Story of Us' hitmaker again.

She later bought the property around nine months later with another agent.

Taylor's New York townhouse, located in the city's affluent Tribeca area, features a gym, home theatre, heated floors and a rainfall steam shower.

There is also a guest suite with a separate entrance, and an outdoor terrace complete with a grill.