BOSTON (AP) _ A 29-year-old student at a controversial school for the autistic died Thursday, two days after she suffered a heart attack in her sleep.

It was the second death of a student of the Behavior Research Institute in two years. Neither has been linked to the school's use of spanks, pinches, vapor sprays and other ''aversives'' to control severely disturbed students.

Abigail Gibson of Hillsdale, N.Y., was pronounced dead at Sturdy Memorial Hospital, said nursing supervisor Arlene Waldron. The cause of death had not been determined, she said.

Ms. Gibson had been in the intensive care unit since Tuesday. She was taken there after being found slumped in her bed at a BRI group home in Attleboro.

The school has been locked in controversy since 1985, when a New York City man collapsed and died after undergoing therapy that included his being shackled and forced to listen to static-like noise. The treatment was part of the aversive therapy developed by BRI founder and director Matthew Israel, a psychologist.

Ms. Gibson was mentally retarded, prone to seizures and had autistic-like tendencies. She received physical aversives as part of her therapy, according to a BRI spokeswoman.

A preliminary inquiry into her heart attack completed Wednesday found no evidence linking her therapy to the seizure. The inquiry was conducted by psychologist John Daignault, appointed by a judge in January to oversee the use of aversives at BRI and its seven group homes in southeastern Massachusetts.

The state Department of Mental Health is investigating Ms. Gibson's heart attack.

A court inquiry into the July 1985 death of Vincent Milletich found Israel and two BRI doctors negligent in approving his therapy but said there was no evidence linking the treatment to his death.

Ms. Gibson was stricken the same day Probate Judge Ernest Rotenberg extended an agreement allowing BRI to use aversives under court supervision. The agreement was part of a settlement of a suit parents of BRI students, including Ms. Gibson, had filed against the state Office for Children after the agency ordered BRI to stop using aversives.

After the heart attack, Ms. Gibson's parents and other parents of BRI students issued statements supporting the school and its therapies.

Attempts to reach Ms. Gibson's parents Thursday were unsuccesful. Their attorney, Robert Sherman, said the Gibsons were in the Attleboro area but would not disclose their whereabouts.

Sherman, who represented the parents of BRI students in their suit against the state, said he hoped Ms. Gibson's death would not again plunge BRI into controversy.

''I would certainly hope that doesn't happen,'' Sherman said. ''The findings of the court-appointed monitor right now should put that issue to rest. The fact is that these are medically involved kids and because they are so medically involved it is not unexpected that some of them will die. That should not be the cause for launching new investigations into the school.''

At hearings Monday before Rotenberg, Israel testified the negative publicity following the Milletich death and ensuing court battle had caused the school's enrollment to drop from 67 to 48. Israel also said BRI was having difficulty hiring staffers and was in poor financial shape because the state has yet to pay $580,000 in damages awarded as part of the settlement.