Theo Mitchell, a defense attorney here, said he was shocked at the sentence. He said that thought he did not want to raise race as an issue, it was not an uncommon practice in the antebellum South to castrate black male slaves. All three defendants are black and so is their victim. Judge Pyle is white.

The judge, described by colleagues as tough but fair-minded, says he has no intention of going back on his decision and argues that it is fair because the men are not being forced to undergo castration.

''They can go to prison if they choose,'' said Judge Pyle, who, when he pronounced sentence, called the crime to which they three men pleaded guilty as the most ''horrible'' rape case he had heard in more than seven years on the bench. The 30-year prison term he offered is the maxiumum under South Carolina law for first-degree sexual battery.

The three men, Roscoe James Brown, 27, Mark Vaughn, 21, and Michael Braxton, 19, pleaded guilty to raping the woman, 23 years old, in April at a motel. According to court documents, she was assaulted repeatedly for six hours and burned with a cigarette lighter. She lost four pints of blood and was hospitalized for five days.

A defense attorney said the woman knew at least one of the men and had threatened to name him in a paternity suit as the father of one of her children. She is unmarried.

It is not yet clear what the defendants' choice will be. At sentencing, they said they were seriously considering accepting the castration option, which would free them on probation for five years.

Defense lawyers said they had advised their clients to postpone any decision while the sentence was being appealed. ''What Judge Pyle is advocating here is physical mutilation of the men,'' said Glenn W. Thomasen, a defense attorney. ''No court can stand for that.''