An activist investor has just bought the most expensive residential property in the country.

Barry Rosenstein, hedge fund manager of Jana Partners, is paying $147 million for a property on exclusive Further Lane.

The 18-acre beachfront property — 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.

Browne 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. Gordon lived there until his death last fall.

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.

Top-notch brokers are furious that the deal was done in secret and not on the open market.

“The trustees of the estate, one would think, have a fiduciary responsibility to get the top dollar, which would have happened on an open market,” one broker fumed.

“This was an inside deal. They closed ranks. It was all very hush-hush,” the broker added.

Rosenstein will have Jerry Seinfeld, art dealer Larry Gagosian and hedge-fund manager Jim Chanos as neighbors.

Entertainment mogul David Geffen was said to be one of the house hunters who looked at the property before he signed a contract to buy Courtney Sale Ross’ estate on Georgica Pond for $50 million.

The $147 million sale of Browne and Gordon’s home breaks the record set two weeks ago when the 50-acre Copper Beech Farm in Greenwich, Conn., sold for $120 million.

The deal also tops the $103 million Ron Baron paid in 2007 for an undeveloped 40-acre parcel, also on Further Lane, where the billionaire is building a 28,000-square-foot mansion.