A Fairfax County man who pleaded guilty to having sexual relations with two boys was sentenced yesterday to 20 years in a Virginia penitentiary. It was his 10th conviction in two decades for molesting children.

"Probably the most disturbing thing . . . is with respect to the system that has allowed him to continue what he has been doing for so long," said Assistant Commonwealth's Attorney Corinne J. Magee, who made an impassioned plea that Judge J. Howe Brown Jr. hand 51-year-old Luther A. Beahm a life sentence.

Beahm's previous convictions had never carried sentences of more than 18 months.

"Mr. Beahm is a classic pedophile," Magee said. "He is molesting boys at the age he was molested as a child . . . . There is absolutely nothing that can stop him."

Beahm was sentenced by Brown in Fairfax County Circuit Court yesterday to 15 years on a sodomy charge with an 11-year-old, and five years on a second sodomy charge with the boy's 13-year-old brother. The incidents occurred in April, and Beahm pleaded guilty to the charges in December.

Previously, Beahm, of 7707 Eagle Ave. in the Alexandria area, had been to court on seven different occasions on 11 counts of sexually abusing young boys.

He had been convicted on nine of those counts.

A thin, pale man who shook nervously at yesterday's sentencing, Beahm has said that he had been molested by an adult when he was 11 to 16.

Before his most recent arrest, Beahm had voluntarily entered a controversial program through Johns Hopkins Hospital in Baltimore that uses the drug Depo-Provera to reduce the sex drive of sex offenders. Beahm's attorney, Jeffrey B. Cohen, said yesterday that Beahm left the program because he wished to resume his life as a pedophile.

Beahm said yesterday that recent personal growth has led him for the first time to confront and control his pedophilia.

He will be eligible for parole in four years.