A 10-year-old girl was found to be six months pregnant after being taken to hospital with stomach pain, leading to the arrest of a man accused of abusing her.