A 24-year-old Alleghany County man is behind bars on charges that he had sex with an underage Surry County girl, Sheriff Graham Atkinson said Wednesday.