A 19-year-old Northwest Washington man was sentenced yesterday to a 26-year prison term for killing a neighbor last summer in an attempted robbery that was captured on a security videotape.

The sentence was too little for Cervando Hernandez's family and friends, who wanted nothing less than the death penalty for the killer, Malcolm Pearsall, even though that was not a possibility in D.C. Superior Court.

And it appeared to be too much for Pearsall's family members, whose eyes welled up with tears after the judge handed down the term.

"I'm sorry," a relative of Pearsall's told Hernandez's cousin, Marco Villa, when the families came face to face outside the courtroom. "It should not have happened."

Hernandez, 22, an immigrant from Mexico, had been out with friends for a night of revelry that ended early on July 23. After arriving at his apartment building, in the 2800 block of 15th Street NW, Hernandez and three other men -- Luis Zurita and brothers Pablo and Magaleno Huezo -- hung around for a bit in the lobby, chatting.

Seen on the security video recording, which was played yesterday for Judge Robert I. Richter, the men looked happy and relaxed.

Then Pearsall, who lived around the corner, entered the picture, having been let into the building by Hernandez in a fateful act of courtesy. Disappearing for a short time, Pearsall reemerged brandishing a gun and demanding the men's money.

Magaleno Huezo tried to knock the gun from Pearsall's hand, which set off a furious struggle. In the midst of it, Hernandez, on the edge of the scrum, was shot in the head by Pearsall and killed instantly.

The fight dragged on, a furious struggle for control of the gun.

Huezo was shot in the abdomen and critically wounded. For weeks afterward, he remained at Howard University Hospital before being transferred to a rehabilitative hospital, where he was kept for two months.

Finally breaking free of the fracas, Pearsall fled the building -- not knowing that his deadly attack had been recorded.

Police quickly learned of the security camera system and distributed a clip of the attack, along with a description of the shirt Pearsall had been wearing. "I do all my own stunts," the shirt read.

Pearsall soon was identified and was arrested two days after the killing. He pleaded guilty in August to charges of second-degree murder and aggravated assault.

Assistant U.S. Attorney Magdalena A. Bell said that Pearsall didn't need the money. His grandmother left him a refrigerator full of food and spending money.

"Clearly, this was not a crime of necessity," Bell told Richter. "It was a crime of greed."

When his turn came to speak, Pearsall asked to address Hernandez's relatives, who listened through an interpreter.

"I just want to say that I apologize. . . . I never intended on taking anyone's life," he said. "I think about it every day, and I'm going to have to think about it for the rest of my life."

Under the court's voluntary sentencing guidelines, Pearsall faced up to 36 years in prison on the two charges, and the government had sought the maximum penalty.

Richter said that Pearsall's early plea and the fact that he did not set out that night to kill someone merited some consideration.