Kyle Hulbert, a man obsessed with vampires and dragons who used his 27-inch sword to kill a respected Loudoun County scientist, was sentenced yesterday to life in prison.

Hulbert, 20, attacked Robert Schwartz, 57, at his secluded Leesburg farmhouse Dec. 8, 2001, at the behest of Schwartz's daughter Clara Jane, Loudoun prosecutors said. Clara Schwartz had told Hulbert that her father hit her, yanked her hair and poisoned her food. Hulbert, who fancied himself a protector of the downtrodden, told police he was haunted by images of his friend's suffering.

Hulbert, who has a history of mental illness, pleaded guilty in March to a murder charge. Yesterday, he apologized to the Schwartz family and said he thought what he "was doing was right" when he slashed Robert Schwartz on that rainy Saturday night.

"I did kill Dr. Schwartz," Hulbert said at his sentencing hearing in Loudoun Circuit Court. "Nothing will change that. There is nothing I wouldn't give to take that act back. I allowed myself to be poisoned by Clara. . . . Not a day goes by that I don't think about what I did. There is not a day that goes by that I don't regret going into the house. There is not a day that goes by that I don't regret meeting Clara Schwartz."

Hulbert's sentencing brings to a near conclusion the story of a group of friends whose shared interest in fantasy worlds was at the center of one of Loudoun's most bizarre and brutal killings. Clara Schwartz, 20, orchestrated her father's death, prosecutors said, and enlisted Hulbert and two other friends to help carry out the plot.

Mary Schwartz, Robert Schwartz's mother, said seeing her son's killer handed a life sentence brought the family some small measure of comfort.

"I don't know if there can be real closure, because we lost a very important member of our family," Mary Schwartz said. "But it certainly helps that Kyle Hulbert won't have the opportunity to inflict on another family this tragedy."

Robert Schwartz, the victim's father, said that perhaps the most painful aspect of the case has been hearing about the influence his granddaughter wielded over her father's killer. "The great pain for us is the fact that Clara Jane was so important in his life," he said.

Clara Schwartz, a former James Madison University student who is serving a 48-year prison sentence, had a troubled relationship with her father that grew worse when her mother died of cancer in 1997, according to prosecutors. She felt persecuted by his disapproval of her clothes and friends and grew to hate him. She asked a friend to kill him, but the friend ignored her.

In the fall of 2001, Clara Schwartz met Hulbert at the Maryland Renaissance Festival. They bonded over their fascination with witchcraft and the occult.

Hulbert, who had bounced between foster homes and psychiatric facilities for most of his life, has bipolar disorder and attention deficit hyperactivity disorder, according to Howard Glick, a psychiatrist with the Loudoun County mental health department, who testified yesterday. Glick testified that Hulbert created imaginary friends, including vampires and dragons, that "in effect became his family."

Hulbert and Clara Schwartz quickly became close and would talk on the phone and send instant messages by computer, prosecutors said.

When Clara Schwartz complained that she was abused by her father, Hulbert felt compelled to act, said his attorney, William Fitzpatrick. "He was given an opportunity to live out his fantasy . . . and he couldn't stop himself," Fitzpatrick said. "She was the puppet master; Kyle Hulbert was the puppet."

Circuit Court Judge Thomas D. Horne said he sympathized with Hulbert because of his difficult childhood and understood why he took refuge in a fantasy world. But he said Hulbert was responsible for his actions when he killed Schwartz.

"This is not a fantasy world for [the Schwartz family]. It's real," Horne said. "Every day they live with the death of Robert, a child, a father, and the fact that he left this world at your hands and at the hands of his own daughter."

Clara Schwartz was convicted last year of murder and solicitation to commit murder, and another friend, Michael Pfohl, 22, is serving an 18-year sentence for second-degree murder. Pfohl's girlfriend, Katherine Inglis, 20, faces a conspiracy charge in the plot.

Kyle Hulbert, who attacked Robert Schwartz with a 27-inch sword in his Leesburg farmhouse in December 2001, pleaded guilty to a murder charge. Robert Schwartz was slain by a friend of his daughter, who said Schwartz abused her.