A Virginia judge who last month threatened a 19-year-old Prince William County man with 240 years in prison for burglary sentenced the man yesterday to a 10-year term after the county's black community reacted angrily to his handling of the case.

Circuit Court Judge Percy Thornton, who warned Garland D. Gaskins he might "never see the light of day again" after his conviction on 12 burglary charges, said yesterday he had meant his statement at a July 9 bond hearing as "shock treatment."

"My purpose," Thornton told a Manassas courtroom packed with Gaskins' supporters, "was to bring about a seriousness, the reality that you could get 240 years."

There was widespread relief among the audience, which included leaders of a number of black groups and civil rights organizations.

"Oh, I'm relieved," said Gaskins' mother, Helen Jackson of Manassas, who had to stand in the hallway at the beginning because the courtroom was so crowded. "I thought he would get 30 years or more."

Echoing other blacks who came to witness the sentencing, Jackson said the angry reaction of the black community after Thornton's July 9 threat "had a lot to do with what happened" in the courtroom yesterday.

"I think that under the circumstances it was a fair decision," said Juanita Johnson, a member of the Prince William NAACP and one of the most outspoken critics of Thornton's earlier threat. "I'm hoping Garland Gaskins will go in the reformatory and take advantage of all the programs there and come out a rehabilitated person."

Gaskins' sentence, which included 16 years suspended and eight years on probation, means Gaskins could be released on parole in 2 1/2 years.

Johnson said "the black and white tax-paying community is partly to blame for Garland ending up the way he did. There are no recreational facilities or anything else for the young people to do."

Last November Prince William voters rejected by a wide margin a major spending program for new and improved parks and other recreational facilities. Though the county has been developing rapidly, services have not kept up with the new urbanized population.

Johnson said one result of the Gaskins case is that "we (the black community) are going to be better organized." She and two other area blacks, Laurie Collier and Nelli McCloud, have formed a "commission on civil rights" to monitor what happens to black defendants in Prince William courtrooms.

The revitalization of the black community, whose grievances have been increasingly overshadowed by issues and problems associated with Prince William's sharply felt growth pains, apparently is beginning to produce results.

Hours after Gaskins' sentencing yesterday, County Executive Robert S. Noe, Deputy Police Chief Ernest Graves and their counterparts from Manassas met in closed session with Dr. C. N. Bennett, president of the county NAACP, and Frank Tyler, a conciliation specialist with the U.S. Justice Department's community relations service.

A spokesman for Noe said later county officials agreed tentatively to attend a Justice Department-sponsored course on police-community relations that will be held later in the year in Virginia Beach.

Even Judge Thornton seemed to be responding to the newly heightened consciousness of blacks who live in the area. "I understand your concerns," he told the packed courtroom.

After adjournment, a bailiff suddenly called the court back to order. Thornton returned to the bench to say he forgot to mention that Gaskins had the right to appeal his sentence.