DEDHAM, Mass. (AP) _ A jury Wednesday began deliberating whether a 15-year-old who admitted bludgeoning a classmate with a baseball bat was a cold-blooded thrill killer or a troubled teen-ager whose cries for help had been ignored.

The panel deliberated for four hours Wednesday before recessing until Thursday morning.

The prosecution in its closing argument portrayed Rod Matthews of Canton as a calculating murderer who lured 14-year-old Shaun Ouillette into the woods in November 1986 just ''to find out what it was like to kill somebody.''

''He did that because he doesn't care about anybody,'' said Norfolk County District Attorney Peter Casey, who repeatedly jabbed an accusatory finger at Matthews. ''What did it feel like? It was deliberate. ... He really wound up and hit him about the head.''

Defense attorney John Philip White urged the jury to deliver a verdict of innocent by reason of insanity, characterizing Matthews as a ''diseased intellect'' unable to act rationally. White also said attempts by Matthews, 14 at the time of the slaying, to seek help from teachers prior to the Nov. 20, 1986, slaying were ignored.

Matthews, whose eyes were downcast during the two hours of closing arguments Wednesday, the seventh day of the trial, admitted to clubbing Ouillette, also of Canton. He had told friends he wanted to kill someone and had chosen Ouillette. After the slaying, he showed them Ouillette's body.

''Had they said, 'No, don't kill Shaun Ouillette,' in all likelihood Shaun Ouillette would not have been harmed,'' said White, as Matthews' mother, Janice, sobbed quietly and shook throughout his statement.

Matthews faces a mandatory sentence of life imprisonment without parole if convicted of first-degree murder. If found guilty of second-degree murder, the maximum would be life imprisonment with a chance of parole. A manslaughter conviction would bring a maximum prison term of 20 years.

White said if Matthews is found innocent by reason of insanity, he will be evaluated by the state Department of Mental Health and is likely to be hospitalized for at least ''14 to 15 years.''

Casey said the defense's contention that the drug Ritalin had affected Matthews adversely was a ''smoke screen.'' Casey noted testimony from several medical experts that Ritalin does not permanently alter behavior or trigger violence or hallucinations in normal doses.

White depicted Matthews as a highly unstable youth whose use of Ritalin to control hyperactivity may have triggered his violent behavior.

Dr. Bernard Yudowitz of Belmont's McLean Hospital testified Monday that Ritalin may have made it harder for Matthews to control his behavior. Matthews first decided to kill someone after viewing the controversial videotape ''Faces of Death,'' which shows animal and human executions and tortures, said Yudowitz.

Matthews said he had plotted the slaying for a month to experience what killing someone was like, according to testimony from two classmates who were shown the body by Matthews prior to a pre-Thanksgiving pep rally.

Ouillette's body was discovered in December 1986 after one of the youths sent police an anonymous letter. The youths testified that Matthews, who is being tried as an adult, selected Ouillette because he did not feel he would be missed.

None of the teen-agers who knew of the slaying faces prosecution.

The trial was attended each day by several dozen residents of Canton, a middle-class community of 17,000 people about 15 miles south of Boston.

''It's been long and hard but it's been worth it. Anytime you have to fight for your child it's worth it,'' said Jeanne Quinn, Ouillette's mother.

The case has been compared to the trial of Anthony Broussard, 18, sentenced 25 years to life Dec. 3, 1982, in San Jose, Calif., for killing his girlfriend the year before. Broussard, who was tried as an adult, took at least 13 schoolmates to see the victim's body. The movie ''The River's Edge'' was based on that case.