A resident of an exclusive gated community has pleaded guilty to first-degree murder in the grisly killing of a neighbor whose head was found in the trunk of his car.

Evan Marshall, 32, a bedding salesman, entered the plea Wednesday to murder, assault and other charges, about a week before jury selection was about to begin.

Marshall was arrested a year ago in the death of retired schoolteacher Denice Fox, his neighbor in Glen Cove on Long Island.

Marshall will get 30 years to life in prison when he is sentenced on Nov. 19 in Nassau County Court; he could have received life without parole if convicted at trial.

Authorities said Marshall broke into Fox's home and killed her, then took her remains to his home and dismembered them.

Her head was later discovered in the trunk of Marshall's car. The rest of Fox's remains, and two knives taken from her home, were found in trash cans in the basement of the home Marshall shared with his mother.

Fox, 57, who died on Aug. 17, 2006, was a retired New York City special education teacher who had moved to Glen Cove with her family several months earlier; police don't believe the suspect and victim knew each other.

Fox's daughter called police after she discovered her mother missing from her home, which showed signs of a break-in and had blood splattered in the foyer.

Marshall was arrested the next day near the crime scene.

Defense attorney William Keahon had argued that because Marshall, who had a history of drug problems, had been staying in a rehab facility, police had no cause to suspect him as the killer. But police said they found ID cards and other items belonging to Marshall when they searched his mother's home.

Prior to the killing, Marshall had no violent criminal history, with arrests only for petty theft and driving while intoxicated, authorities said.

On the morning Fox died, he also was accused of running down a pedestrian, leaving the woman hospitalized.