Police say a rapist who was knifed by his 16-year-old victim and then beaten with a baseball bat by a neighbor rushing to her rescue died from the wounds yesterday.

Baltimore police said Thomas R. Brooks, 25, of northwest Baltimore, first was stabbed in the chest and arm Sunday night with a hunting knife wielded by the rape victim. Then a neighbor, summoned by a child with whom the rape victim had been baby-sitting, repeatedly struck Brooks on the head with a baseball bat.

Brooks died about 14 hours later at Sinai Hospital. Prosecutors in the Baltimore state's attorney's office said the actions of both the rape victim and her rescuer could be justified on self-defense grounds, and that criminal charges against them are thus unlikely.

Police would not disclose the names of either the victim or her rescuer. They said the rape victim, a high school student, said she did not know her assailant.

They said the girl was in a back room of her parents' apartment in northwest Baltimore when, at about 11:20 p.m. Sunday, one of four children she was caring for answered a knock on the door and let Brooks in. The victim's parents were not home, police said.

Brooks charged through the living room, knocking one of the children to the side, grabbed the baby sitter and raped her in a bedroom, police said.

Moments later, police said, the girl grabbed a hunting knife from a bureau and stabbed Brooks in the chest and slashed at his arms and shoulders. Brooks collapsed in the kitchen but then began to get up in an apparent attempt to leave, police said.

Meanwhile, one of the children ran out of the apartment, screaming for help. He returned with a 57-year-old neighbor brandishing a baseball bat, according to police. The neighbor hit Brooks "four or five times right on the old coconut," subduing him, according to police spokesman Mike Bass.