A man is being accused of sexually assaulting a 2-year-old girl inside a car parked outside the Worcester Walmart store while a relative of the child allegedly took photos of the act, according to a prosecutor and court documents.

Assistant District Attorney Lina Pashou said that a witness saw the alleged incident inside a maroon Ford Explorer on Jan. 18. The witness told police that an adult man appeared to be engaging in a sexual act with a young girl.

That witness said an adult woman in the car was using a large white cell phone to take photos of the act, Pashou said.

Joshua Rezsnyak, 24, and Mary McForbes, 27, are charged with rape of a child, aggravated, 10 year age difference. McForbes is also charged with reckless endangerment of a child.

McForbes is a family member of the child's, according to court documents. The child is described as a 2-year-old who is known to the commonwealth.

Both Rezsnyak and McForbes were both listed as living at 53 Perry Ave., Apt. 3, in Worcester, according to court documents, but McForbes' attorney said in court that she lives alone in Worcester.

A not-guilty plea was entered on the pair's behalf during their arraignment Monday in Worcester Central District Court.

As Pashou described the allegations against the two, people sitting in the courtroom gasped, uttering statements quietly to one another.

One woman was told by a court officer to leave the room after exclaiming that the two should "rot in jail."

The witness made eye contact with Rezsnyak as he committed the act, Pashou said.

Then Rezsnyak picked the child up and placed the child in the backseat, Pashou said.

A Sexual Assault Nurse Examiner examined the child, Pashou said. The child had abrasions consistent with penetration.

Surveillance video showed Rezsnyak and McForbes entering Walmart after the alleged assault, Pashou said.

McForbes has two children, her attorney said in court. She was held on $25,000 cash bail.

Rezsnyak was held on $50,000 cash bail. The two are scheduled to return to court on Feb. 21. Both are ordered to stay away and have no contact with the victim.