The beachfront property on Further Lane — with formal gardens and a pond — was the dream house of Christopher H. Browne, managing director of the Tweedy, Browne Company investment firm, and his boyfriend, architect Andrew Gordon. Photo: Hampton Pix

An 18-acre estate in East Hampton has been sold for $145 million, sources say, setting a new record for the highest priced residential sale in the nation. But the buyer remains a secret.

“Everybody out here is totally mystified,” one local told me.

The beachfront property on Further Lane — with formal gardens and a pond — was the dream house of Christopher H. Browne, managing director of the Tweedy, Browne Company investment firm, and his boyfriend, architect Andrew Gordon.

Photo: Hampton PixBrown died of a heart attack at age 62 in a Florida bar in December 2009, leaving almost his entire estate to Gordon, his partner of 10 years.

But a dozen of Browne’s relatives — and his longtime chef — challenged the will. Gordon, who was dying of cancer, made a confidential settlement in December 2012 that allowed him to spend the rest of his life in the house.

When Gordon died last September at the age of 52, Browne’s relatives immediately looked to sell the property — and didn’t use a broker, to avoid paying commissions.

“Somehow, someone got the inside track. All the brokers are crestfallen,” a source told The Post’s Jennifer Gould Keil.