A historic waterfront estate in Hampton Bays that served as a filming location for the 2007 Nicole Kidman film “Margot at the Wedding” is in contract. The nearly 9-acre property had been listed for $4.995 million.

The circa-1897 estate was called Shorebluff for its location on bluffs overlooking Peconic Bay, says listing agent Todd Bourgard of Douglas Elliman Real Estate.

advertisement | advertise on newsday

“They named the homes back then because there were no names on the roads,” Bourgard says.

It was built for $2,700 by Sarah Southgate, the widow of a noted Episcopal bishop, says Bourgard. Five generations of Southgate’s descendants have since lived on the property, which also includes Driftwood, a cottage built in 1928.