Taylor Swift needed to calm down. During the pop star’s short-lived romance with Conor Kennedy in 2012, she bought a house in Hyannis Port, Massachusetts, mere weeks after meeting him — and the purchase made the then 18-year-old “nervous,” according to a new book.

The Kennedy Heirs by J. Randy Taraborrelli details the summer fling the songstress, now 29, had with the son of Robert F. Kennedy Jr., including how tragedy brought them closer together and the musician’s surprising real estate purchase.

“Taylor was saddened when she heard the details of how Mary Kennedy had died,” Taraborrelli wrote about Conor’s mother death by suicide two months prior. “She was close to her own mother and couldn’t imagine how Conor was able to go on after facing such tragedy. She admired his strength, his resolve.”

The intense intimacy may have led Swift to make a grand gesture.

After just six weeks together, she bought a $5 million house near the Kennedy compound, according to the book. “Conor liked Taylor, don’t get me wrong,” Conor’s friend told the author, “but this business of her buying the house on the Cape made him nervous. It seemed as if she was getting a little too attached, spending five million bucks on a house just to be near the guy.”

Us Weekly reported the romance back in 2012.

“Taylor is officially dating Conor Kennedy,” a source confirmed to Us in August 2012. Swift has “been a real shoulder to cry on,” the source explained about Conor’s mom’s death, adding at the time that the 1989 artist was “really smitten.”

A source confirmed the pair’s split to Us just two months later. “They quietly parted ways a while ago. It was just a distance thing. No hard feelings. They’re fine.”

Swift sold her Hyannis Port house a year later.

The “You Need to Calm Down” singer is currently dating boyfriend Joe Alwyn. The pair have been linked for two years, and according to a source, plan to get engaged soon. “Taylor’s friends are all talking about a proposal and how she really wants to marry Joe,” the insider told Us in March. “He’s her dream guy.”