A D.C. Superior Court judge imposed a sentence of 14 1/2 years to life in prison yesterday on a Northwest man in the slaying of a security guard last May at a city-run shelter for homeless families and the attempted rape of a shelter resident.

Edwin M. Lane Jr., 30, of 1757 Euclid St. NW, told Judge Truman A. Morrison III that "it is kind of hard for me to believe I let something like this happen . . . . I'm sorry."

Assistant U.S. Attorney William Jackson said Lane entered the homeless shelter at 2809 15th St. NW after hours, wrestled a gun from the security guard and shot her five times. Lane pleaded guilty to second-degree murder while armed, first-degree burglary while armed, and assault with intent to commit rape.

The guard, Elaine Johnson, 34, died soon afterward at Washington Hospital Center. Johnson, whose four children ranged in age from 5 to 17, was addressing invitations to her oldest son's high school graduation when she was shot.

After shooting Johnson, Lane took her master room keys, walked to the room of a female acquaintance, fired Johnson's gun into the lock and entered the room, Jackson said. Lane then ordered the woman's three young children into a back room and had intercourse with the woman against her will.

Reita Pendry, an attorney for Lane, told the judge that Lane had committed the acts under the influence of PCP, a powerful hallucinogen, and she said his chronic use of the drug had rendered him psychotic.

Jackson countered that it was common for criminal defendants to admit their actions but attempt to excuse them because of their drug use.

"How many people are going to be killed in this community because somebody has voluntarily ingested drugs," Jackson said.

Judge Morrison told Lane that he had decided on a less-than-maximum sentence because Lane had no significant criminal record and because there was a possibility of rehabilitation. The maximum sentence Morrison could have imposed for the three offenses was 35 years to life.

Morrison rejected Lane's plea for leniency based on his PCP use, however, saying that if anything, the drug use was an aggravating factor.

"In the last analysis, PCP did not kill Elaine Johnson," Morrison said. "Mr. Lane did."

Her husband, Samuel Johnson, was in the courtroom when Morrison imposed the sentence, and later said the length of the prison term "was quite a shock."

"He called it a heinous and callous act, which it was, but the sentence didn't seem to measure up to the crime that was committed," Johnson said.