A Virginia judge sentenced convicted rapist and kidnaper John J. O'Grady yesterday to life plus 51 years in prison for abducting and sexually assaulting a Fairfax County nursing student last September.

O'Grady, 33, is already serving a 15-year sentence at a federal prison in Wisconsin for the $50,000 extortion kidnaping of a Northern Virginia banker's daughter five days after the incident involving the student.

The sentence by Alexandria Circuit Court Judge Albert H. Grenadier was the most severe O'Grady has received for his role in the kidnaping incident which ended after banker Milton Lee Drewer Jr. paid a $50,000 ransom to free his daughter. Yesterday Grenadier told O'Grady that "society should not only be concerned with the criminal . . . . society also cries for its victims. In your situation the court is hard pressed to find any area where it can sympathize with your position."

Commonwealth's Attorney John Klock said O'Grady, a former Fairfax County resident, would be eligible for parole after serving 15 years of his sentence in Virginia. "I think the punishment ought to fit the crime and this one does," the prosecutor said.

O'Grady, whose lawyer said he will appeal the sentence, was convicted of abducting and raping the 27-year-old nursing student during what prosecutors said was his first attempt to kidnap Carol Lynn Drewer, 19, the daughter of the president of the First American Bank of Virginia. Police said O'Grady planned to used the student as a decoy in an effort to lure Drewer into the student's car.

He was sentenced yesterday on four charges: rape, sodomy, kidnaping with intent to defile and use of a firearm in the abduction and rape. Christopher Hopkins, his attorney, asked that "revenge" not figure in the sentencing, and urged Grenadier to keep O'Grady's federal sentence in mind.

The lawyer also noted that his client also faces a possible life term in Arlington next month, where he is to be sentenced on several counts of robbery and other charges growing out of the Drewer kidnaping. "Is the court willing to throw away Mr. O'Grady's life?" Hopkins said. "Are the 32 years of his life as a pretty good human being to be consigned to the waste heap?"

O'Grady had no visible reaction to the sentence, but his mother, seated nearby, lowered her head after the judge had finished.

The nursing student, who sat in the back of the courtroom in tears during much of the defense attorney's argument, said afterward that she was satisfied with the sentence. "I am in shock, and I'm just so happy. The ax has fallen and this is it."