STAMFORD, N.Y. (AP) _ A 23-year-old suspect in the slayings of his parents and two other relatives was shot and killed by state police Thursday after he opened fire, ending a six-hour standoff, authorities said.

Eben McDowell, 23, of Stamford was killed around 5 p.m. at a Schoharie County farm, where he'd fled after his father, mother, brother and grandfather were killed Wednesday in neighboring Delaware County, officials said.

The four were shot to death at the grandfather's cabin in woods just outside Stamford, about 50 miles southwest of Albany, said Delaware County Sheriff Paul Peterson.

The grandfather, Charles Klepetar, 78, was found shot in his bed. Attorney Robert H. McDowell, 59, and his 22-year-old son Daniel were found at the edge of a pond near the cabin, and his wife, Elizabeth, 48, was found in the pond, Peterson said. She had apparently been trying to flee.

The bodies were discovered Thursday morning by a social worker who'd found a note Eben McDowell left on the front door of his father's Stamford law office, said Peterson.

''The note on the office door of the law office was written in third person to make it look like his father did it,'' Peterson said.

A police helicopter tracked Eben McDowell to a pond a few miles north of the crime scene and a half-mile away from the family's home.

Police cornered McDowell there around 11 a.m., and had been trying to persuade him to surrender when he started shooting, Peterson said.

People who knew the suspect said he had a history of getting into trouble.

''He got into his share of trouble as a kid, just as any kid would, but in the last few years he really went bad,'' said Fred Hyatt, who employed McDowell three years ago at a Stamford lumber yard.

The slayings shocked residents of this town of less than 2,000 people.

''I couldn't believe it when I heard about it. I was just sick,'' said diner owner John DeLeo. ''I just can't figure it out. They were beautiful people.''

Robert McDowell was involved in many community affairs, while Elizabeth McDowell volunteered to tend flowers along Stamford's main street, residents said.

''They were a very respected family,'' said Stamford resident Donna Williams.