Standing in a courtroom packed with police officers, Walter O. Johnson was sentenced yesterday to spend the rest of his life in prison for the slaying of Metro Transit Officer Marlon F. Morales.

Already facing a mandatory life sentence, Johnson was given the maximum possible terms on practically all the other charges that a jury convicted him of in May in the June 2001 killing at the U Street/Cardozo Metro station in Northwest Washington -- as if to underscore the court's contempt for his crimes.

D.C. Superior Court Judge Ann O'Regan Keary, looking out on an overflowing courtroom, told Johnson that society should be shielded from him for the rest of his life and that it would be as a result of the law that made murder of a law enforcement officer a life offense.

"No other family should have to suffer as this family has," Keary told Johnson.

When asked by Keary whether he had anything to say, Johnson replied, "Nah." He has denied killing Morales and is appealing the conviction.

Sitting in the first row were Morales's widow, Jennifer, and his brother, Omar. Each had stood before the judge to describe the toll the shooting, on June 10, 2001, had taken on their family.

The night her husband was shot, left clinging to life on the Metro station's floor, officers came to her door to give her the grave news, Jennifer Morales said. It was the night her life was forever changed.

At first, the prognosis was good, she said. At the hospital, he squeezed her hand three times, which meant, "I love you." But she sensed that he was not improving. "They kept telling me he was going to be all right, but the look on his face, I knew he wasn't.

Three days later, he died, the second Metro officer killed since the force was created in 1976.

Johnson, a convicted bank robber who had been paroled a month earlier, was arrested in Philadelphia a day after Morales died. He had been stopped for a routine traffic violation and was found to be carrying Morales's gun.

The gun was stolen when Morales was shot, but Johnson claimed that he bought it on the street in Philadelphia. Indeed, Johnson's defense at his trial in the spring was that he was not in Washington the night of the shooting and that he was the victim of mistaken identity.

But the first government witness undercut Johnson's contention that he was not in the District. The station manager working that night testified that he confronted Johnson over the man's failure to pay the fare as he exited the station. The manager testified that he and Johnson spoke for several minutes, face-to-face, before Morales stepped in.

A rookie officer, Morales, 32, figured that he could sort out the matter quickly, but when he asked to see Johnson's identification, the man instead drew a gun.

Already wanted for failing to show up for a parole meeting, Johnson had been involved in a shooting days earlier in Philadelphia and the gun he was carrying was used in that shooting, prosecutors said.

A check of his identification probably would have revealed the warrant and a search would have probably turned up the gun, each of which would have been enough to send him back to prison. So he shot Morales in the head, stole his gun and ammunition and fled, eventually making his way back to Philadelphia, prosecutors said.

It was a fatal shooting that prosecutors say may have averted another fatal shooting.

In court papers filed this week, prosecutors June M. Jeffries and David J. Gorman set out what they believe was Johnson's reason for coming to Washington that day three years ago. They said he was coming to seek revenge against a Northwest Washington woman who turned him in for a 1989 bank robbery in the Philadelphia area -- leading to his incarceration.

Now 36, Johnson will be heading back to prison. In court yesterday, his attorneys, Renee P. Raymond and Yvonne Williams, asked the court to take steps to see that Johnson is not harmed there.

Johnson has had difficulties while behind bars. According to court papers, a contract was put out on his life after he beat up Mafia boss John Gotti in 1996 at a federal prison in Marion, Ill. His attorneys said yesterday that they believe the contract is still in force.

During his last stretch in federal custody, he was transferred several times because he was fighting and stealing. Last year, as he was about to go on trial for Morales's slaying, he was stabbed repeatedly in the D.C. jail. No one has been arrested in that attack.

Morales's widow, Jennifer, holds daughter Meghan. With them are Morales's sons, Jeramy and Joshua.Transit Officer Anthony Mendoza, who went through police academy training with Morales, tries to amuse Meghan.