A judge refused to throw out a claim of sexual harassment against the star and co-star of “The Wonder Years” but dismissed a claim against a third actor Wednesday.

Fred Savage, 17, who played Kevin Arnold on the ABC series, and Jason Hervey, 21, who played his older brother, are accused in the civil lawsuit of sexually harassing a costume designer on the set.

Michele Long, 31, claimed in a suit filed in March that Savage often tried to hold hands with her, asked her to have an affair and made “sexual remarks.”

Superior Court judge Ricardo Torres let stand the claims against Savage and Hervey, but dismissed a claim of sexual harassment against series father Dan Lauria.

However, Lauria remains a defendant, accused of defamation.

The lawsuit seeks unspecified compensatory and punitive damages.