Court orders rapist to be held in prison custody