Andy Samberg has bought a gated estate in the Hollywood Hills for $6.25 million in an off-market deal, and with it a slice of Los Angeles’ rich real-estate history.

The distinctive residence known as Moorcrest served as the former home to both actor Charlie Chaplin and actress Mary Astor.

Chaplin was a tenant, renting out the home in the early 1920s. Astor and her parents, Otto and Helen Langhanke, lived at the property for nearly a decade after the family bought the residence in 1925.

Designed by Marie Russak Hotchener, the restored estate incorporates Moorish, Mission Revival, Gothic and Art Nouveau styles. Leaded stained-glass windows, copper and marble baseboards, custom cabinetry, hand-painted frescoes and elaborate mosaic tiles are among the architectural features.

The more than 6,400 square feet of living space includes an updated kitchen, formal living areas, four bedrooms and six bathrooms. The master suite contains a copper fireplace and a custom steam shower.

There are patios, walkways and a swimming pool on the nearly 1-acre grounds.

Samberg, 35, is known for his time on “Saturday Night Live” (2005-2012) and his role on the Fox sitcom “Brooklyn Nine-Nine.”

Los Angeles Times