A former D.C. public schoolteacher, whose arrest on charges of having sex with a 12-year-old boy spurred calls for more thorough background checks of school employes, was sentenced yesterday to prison by a D.C. Superior Court judge who told the man he was lucky to be alive.

Judge Reggie B. Walton sentenced James B. Crawford, who taught at Woodson Junior High School in Northeast, to a minimum of nearly 52 years to a maximum of 155 years. He told Crawford that he found his conduct "outrageous" and that he was lucky to be alive to serve his prison terms. Some victims' families might have sought their own revenge, the judge said after prosecutor Charles W. Cobb urged the judge to impose a substantial prison term.

Shortly after Crawford 41, was arrested in 1985, school officials here discovered that he had been convicted in 1969 of a sexual assault against an 8-year-old boy in Michigan and had resigned under pressure from a teaching job in Massachusetts when similar allegations arose.

D.C. school spokeswoman Janice Cromer said yesterday that as a result of the system's experience with Crawford, prospective employes will be required to undergo fingerprinting and criminal background checks starting in the fall.

"Unfortunately there is a lot of opportunity nationwide for a lot more incidents like this to happen," said Cromer.

Crawford was convicted by a jury in May of 13 counts of sexual assault after the 12-year-old boy testified that he repeatedly had sex with Crawford during a two-month period in 1985 because Crawford bought him expensive toys and clothing. The boy was not a student at Woodson, but testified that one sexual encounter occurred there.

Cobb said after the sentencing that Crawford's minimum prison term eventually could be reduced by about a third because of recently enacted legislation giving prisoners credit for good behavior.