A US man has accused an 11-year-old girl of raping him in his sleep after he was charged with sexually assaulting and impregnating her.

Justin J. Armstrong pleaded not guilty to raping the girl in Springfield District Court on Tuesday after she alleged he molested her over an 18-month period.

The 38-year-old initially denied having sex with the girl and told police she had been abused by a relative.

After learning DNA evidence could potentially link him to the pregnancy, he suggested that the young girl may have raped him as he slept, The Springfield Republican reported.

The pregnancy was aborted after the girl told a family friend.