A state district judge sentenced a Brownsville man to 12 years in prison for the rape of a 12-year-old girl.