SPRINGFIELD -- A Springfield man who allegedly raped and impregnated an 11-year-old girl denied any wrongdoing and claimed she might have had sex with him in his sleep, a prosecutor said Monday.

Justin J. Armstrong, 38, pleaded not guilty in Springfield District Court to one count of rape of a child by force. He was arrested Friday, two weeks after tests showed the girl was four months pregnant, Assistant District Attorney Jill O'Connor said.

The girl told investigators that Armstrong had molested her for about 18 months and engaged in various sex acts with with her, the prosecutor said.

Armstrong repeatedly told the victim he would be arrested if she told anyone, but she finally broke down and confided in one of her mother's friends on July 9, O'Connor said.

Armstrong denied having sex with the girl, and told police she claimed a younger relative had been sexually abusing her for years. After learning the girl was pregnant, Armstrong suggested that she could have raped him while he was sleeping, the prosecutor said.

The pregnancy was aborted five days later, and DNA testing was performed on the fetal tissue, the prosecutor said. Testing has not been completed.

She asked for $50,000 bail, citing the nature of the charges and the long prison sentence Armstrong faces if convicted.

Defense lawyer Anna-Marie Puryear said her client denies the allegations and asked for $3,000 bail, the most Armstrong's family could raise.

The case, Puryear said, hinges on the outcome of the DNA testing and setting high bail would effectively be jailing Armstrong without proof of wrongdoing.

Armstrong has cooperated with investigators and voluntarily submitted a DNA sample, the lawyer said. He grew up in the Springfield area, has no criminal record and poses no risk of flight, Puryear said.

"All his ties are here," she added.

Judge Robert Murphy set bail at $50,000 and ordered Armstrong to stay away from the victim and her home. Armstrong is due back for a pretrial hearing on Aug. 24.