PENNSAUKEN TOWNSHIP, N.J. (AP) _ A police officer responding to a report of a teen-age drinking party was fatally stabbed, but before collapsing he killed a 15-year-old and seriously wounded the youngster's brother, authorities said.

A neighbor said the incident Friday afternoon in this working-class Philadelphia suburb occurred in an area where ''things are getting pretty bad.'' Another said the party ''got out of hand.''

Patrolman William Brey, a 32-year-old who had served on the township police force for six years, arrived alone at a home in a neighborhood of two-story brick row houses to investigate neighbors' reports of youths on the roof of the house drinking beer.

Camden County Prosecutor Samuel Asbell said three teen-agers - two brothers and a friend - were at the house when Brey arrived, although other younsters had been there earlier.

Brey was stabbed three times in the chest with a knife as he stepped through the doorway, Asbell said.

''The cop was able to get his gun out, shooting two juveniles, killing one and critically wounding the other,'' he said.

A 15-year-old died at Cooper Hospital-University Medical Center in Camden minutes after the 5 p.m. incident, and his 17-year-old brother was admitted in critical condition, hospital officials said.

Brey died at 6:49 p.m. at the hospital, according to spokeswoman Peggy Leone.

The 16-year-old friend ran from the scene, but surrendered after calling his parents, Asbell said.

Asbell said the 17-year-old, whose condition had improved to serious by late Friday, was arrested at the hospital and would be arraigned on a murder charge. The 16-year-old was being held for questioning early this morning, the prosecutor said.

Authorities would not identify the three youths because of their ages.

Asbell said investigators were questioning about 15 neighbors. He said he was not sure if the dead suspect lived at the home where he was shot.

Gene Farley, who owns a service station near the scene, said one of the teen-agers was seen carrying a case of beer into the house late in the afternoon.

''They were whooping it up on the roof, and it got out of hand,'' said Farley, who knew the dead youth as a quiet teen-ager who came into the gas station to buy soft drinks on his way home from school.

Afterward, about 100 people milled about on the street, and directly across from the house where the incident occurred several women held each other and sobbed.

''In this neighborhood, things are getting pretty bad,'' said Stephen Hubbs, 19, who lives nearby.

At the township police station, where the American flag was flying at half- staff, Detective Sgt. George Morris said Brey was the first officer to die in the line of duty in the history of the 86-member department.

Morris said the dead officer was married with no children.