Updated

A confessed rapist was sentenced Thursday to 25 years in prison, days after he voluntarily underwent castration as part of a plea deal to avoid a life sentence.

Circuit Judge Michael Overstreet sentenced Bobby James Allen to 25 years in prison followed by 10 years' probation. Allen pleaded guilty this month to three counts of armed sexual battery and other charges involving attacks in 1998 and 1999. Allen requested castration in exchange for a reduced sentence.

The surgical procedure cost about $2,000, and the court system paid for it, public defender Doug White told The News Herald of Panama City. A message left with White after business hours by The Associated Press was not immediately returned.

Overstreet warned Allen to expect hormonal changes that could lead to the breast development, osteoporosis and hot flashes. Castration results in sterility, a decline in sexual interest and erection problems.