They should have known she was trouble.

Taylor Swift beat a lawsuit filed against her by a Manhattan real estate broker who said the pop star stiffed her out of a $1.08 million commission for the purchase of her Tribeca townhouse.

The “Look What You Made Me Do” singer argued that she never signed a contract.

A Douglas Elliman broker showed a rep from Swift’s company Firefly Entertainment 153 Franklin St. in February 2017, and gave the rep blueprints to the pad that once hosted former International Monetary Fund chief Dominique Strauss-Kahn.

ZAYN MALIK SAYS TAYLOR SWIFT 'WAS TRAVELING AROUND IN A SUITCASE' DURING THE SUMMER OF 2017

The Frenchman was renting the apartment while being investigated over charges that he raped a Midtown hotel maid. He was ultimately cleared and he and his wife flew home to France.

Eight months later, the “Shake it Off” singer purchased the property for $18 million but excluded the Elliman broker from the transaction.

The Grammy Award-winner also owns three apartments at 155 Franklin St., which abuts the townhouse. But the stand-alone home was likely attractive because it had what the apartment building lacked — a paparazzi-proof garage.

The brokerage firm sued, demanding the seven-figure commission, but a judge tossed the suit on Thursday, saying Elliman never had “any formal agreement” with Swift.

“Douglas Elliman’s claims fail as a matter of law for want of an enforceable contract,” Manhattan federal court judge Jesse Furman wrote in the ruling.

TAYLOR SWIFT’S TRANSFORMATION FROM COUNTRY SINGER TO POLITICAL VOICE

Judge Furman said an “informal e-mail” between the parties about viewing the townhouse was insufficient to secure a commission.

“And the e-mail is far from the sort of ‘formal writing’ one would expect in connection with an $18 million transaction,” Furman added.

“The e-mail lacks most, if not all, of the material terms of a real estate brokerage agreement, including the scope and duration of the relationship and the fee,” he wrote.

Reps for Swift did not return messages for comment. A lawyer for the brokerage company declined to comment.

This article originally appeared in the New York Post.