A 9-acre waterfront Hampton Bays compound that has been featured in motion pictures has just gone into contract, according to the website of the real estate agent listing the property.

Shorebluff, as it is known, had been listed for $4.995 million. The sales price will not be revealed until the transaction has closed.

advertisement | advertise on newsday

The spread has been featured in the 2007 film “Margot at the Wedding” starring Nicole Kidman and Jack Black, as well as 2004’s “The Forgotten” with Julianne Moore.

The main house on the property, which has 225 feet of land on Peconic Bay, was built in 1897. There is also a carriage house and a guest cottage.

The listing agent is Todd Bourgard of Douglas Elliman Real Estate.