On Thursday, the last day of the semester, professor Mary Elizabeth Hooker cheerfully greeted her hematology class at the University of Massachusetts at Lowell with homemade baked goods and coffee from Dunkin' Donuts, friends said.
That evening she headed to her Cambridge home, unaware that a student, concerned about his failing grade, was following her with a knife in his car, police records state.
Nikhil Dhar, 22, knocked on Hooker's door at 6:30 p.m., started shouting at her and dragged her to the ground, beating her and stabbing her numerous times before slashing her neck and ripping off her shirt, witnesses and police said. He fled but was quickly apprehended by a neighbor.
Police said they found a bloody note with the word kill in his right coat pocket.
Hooker remained in stable condition in the intensive-care unit of Beth Israel Deaconess Hospital yesterday, as Dhar, 22, pleaded not guilty to charges of armed assault with intent to murder and assault and battery with a dangerous weapon.
The stabbing sent tremors of anxiety through faculty and students at the commuter school as well as in the tranquil middle-class neighborhood where Hooker lived by herself.
Hooker, an associate professor in the department of clinical laboratory and nutritional sciences, was described as ''wonderful" and ''sweet" by colleagues and did not seem a likely target for a hostile assailant, said Garry Handelman, who worked with her.
''She is not the kind of teacher a student would go after," he said. ''She is extremely kind, very gentle, very considerate."
Friends and acquaintances of Dhar said they were shocked to hear that the reserved student, an elected senator on the student government, had been arrested and charged in the attack of a professor.
''Honestly, I would never have known that he would do something like this," Mita Hirani, a student at Lowell, wrote in an e-mail. ''He's a nice kid and just very active in school and always there for everyone."
Kyle Coffrey, who served on the student government with Dhar, said Dhar is very quiet.
''He kept to himself, but if you tried to talk to him, he was very open, very friendly," Coffrey said. ''Everyone says the same thing; we are all shocked."
According to police records, Dhar followed Hooker home from school, trailing several cars behind her so she wouldn't see him. He later told police he went to her home intending to discuss his grade with her, according to court documents. He and Hooker had wrestled over the knife, he told police, and she probably thought he ''was a burglar."
Dhar said he left his knife in the car, but Hooker, dressed in a blue night shirt, was carrying a knife when she opened the door, according to the police report.
But Hooker did not mention a knife to police, according to the police report. Hooker told police that when Dhar said he wanted to discuss his failing hematology grade, she told him that she would get dressed so they could go to Dunkin' Donuts to talk it over, according to court documents.
Dhar then became ''very irate" and ''abusive" toward her, Hooker told police, dragging her out of the house and onto the ground. He stabbed and beat her, according to the police report.
Carlos Madden, 21, who lives a few houses down from Hooker, said he heard shouting and ran outside to find Dhar crouching over Hooker's body as she lay on the sidewalk covered in blood.
''He started slowly walking away," Madden said. ''When I caught up with him at the corner, he said, 'I have a knife.' He seemed pretty calm. He told me, 'She started it.' "
Madden called police on his cellphone and directed them to the street. When they arrived, Hooker was standing on her front porch, bleeding with a 4-inch slash in her neck, according to the documents.
Dhar was standing on a nearby lawn with ''blood all over his hands" and on his sneakers, the police report states.
Dhar was ordered held with out bail yesterday after the arraignment at Cambridge District Court until a dangerousness hearing on Wednesday. A woman and three men standing outside the courtroom identified themselves as Dhar's relatives but declined to comment.
Stephen Hrones, Dhar's lawyer, said Dhar does not have a record and is in Massachusetts on an international student visa. Dhar, who is from Calcutta, wanted to work in the biotech field and is the oldest of two sons, Hrones said.
''He was there to discuss something with his teacher," Hrones said. ''There is absolutely nothing in his past that would indicate an incident of this nature. He seemed to have friends at school. He was involved. His family is very supportive. . . . Obviously, this is a much more complicated scenario than anything the police say or that you can see on TV."
Dhar's parents were stunned by the charges, Hrones said. ''They are not taking it very well," he said.
William T. Hogan, chancellor at UMass-Lowell, issued a statement saying that Hooker, a member of the university's faculty for 12 years, ''is a valued member of the faculty known for her dedication and devotion to her job, her peers, and her students."
Hooker was a research associate at a US Department of Agriculture laboratory in Beltsville, Md., before she started teaching at UMass-Lowell in 1993. She is a Boston University graduate with a doctorate in biological sciences from Georgetown University. She has written papers for journals on such subjects as parasitic wasps and Mexican bean beetles.
Dhar is a member of the school's senior class, according to Patti McCafferty, a spokeswoman for the university, but is still working to complete his junior-year course work.
Kanti Prasad, the faculty adviser of the Southeast Asian Student Association, of which Dhar is a member, said the stabbing sent shock waves through the university's faculty and made him double-check his grade book. Prasad, a professor in the university's electrical and computer engineering department, said, ''We are a tough school and expect a lot from our students, because we are preparing them for the top jobs, and that is our reputation.
''A failing grade shouldn't be the end of the world," Prasad said. ''Usually I find the students may argue but they accept it."
John R. Ellement of the globe staff contributed to this report.