Updated

A Massachusetts teacher was put on leave this week after turning himself over to police in New Hampshire, allegedly for putting his toddler inside a game machine at a shopping mall to steal its prizes.

Anthony Helinski, 34, surrendered to police five days after witnesses at the Mall at Rockingham Park in New Hampshire recorded video of a man encouraging a girl to hand out toys while inside a KeyMaster game, New England Cable News reported.

The video shows another child exclaiming, “Yes, it worked,” as the girl passes the prizes out of the machine, according to Boston news station WCVB-TV. The young girl is later seen poking her head out of the machine before sliding out.

Police received several tips after releasing the video and issued an arrest warrant for Helinski on Wednesday, local Boston station WFXT-TV reported. Police said Helinski immediately surrendered with his attorney.

Helinski, a middle school teacher, was placed on leave pending an investigation, the Andover Public Schools district said in a statement obtained by the station.

"One of our teachers at the Doherty Middle School was involved in an incident in Salem, N.H., last week. Andover Public Schools is fully cooperating with authorities," a district spokeswoman said. "The teacher has been placed on administrative leave pending the outcome of an investigation."

Helinski, of Lawrence, Mass., faces three counts of theft, two counts of criminal trespass and one count of endangering the welfare of a child.

He was released from custody with an arraignment hearing scheduled for Oct. 29.