ROCHESTER, N.H (CBS) — A two-year-old child crying alone in a car parked at a Rochester Walmart was rescued by police on Saturday.

According to officials, the boy was locked in the car for about 40 minutes while his father, Leo Ellis, 35, of Rochester, shopped inside.

READ MORE: Boston Store Owners, Vendors Cash In On Small Business Saturday

Leo Ellis, 35, of Rochester, accused of leaving his two-year-old son unattended in a car (Photo Courtesy: Rochester Police)

They were able to open the passenger door, which was held in place by a bungee cord.

Police said Ellis was arrested when he returned to the car with his merchandise. He could face charges of endangering the welfare of a child or incompetence.

A police officer with a two-year-old child after he was left alone in a car (Witness Courtesy Photo)

READ MORE: Patriots Plane Flies UNH Men's Soccer Team To NCAA Tournament Game In Oregon

“The child did appear to be somewhat upset by the whole situation, I believe he was crying when the officers did arrive,” said Rochester Police Sgt. Thomas Powers.

The boy was placed into his mother’s custody at the scene. She and Ellis are not married, nor do they will with one another.

Investigators said Ellis was looking after him for the weekend.

“It’s sad, the guy should be charged. No one should be leaving kids or animals in the car while they go into the store, even for five minutes,” one man commented.

Another said, “Leaving a kid in the car for forty minutes while you’re inside? It’s stupidity on his part. I mean, why would you leave anyone in the car for that long unattended, especially that young.”

MORE NEWS: BC Falls To #18 Wake Forest 41-10 In Regular Season Finale

Ellis was released on $5000 personal recognizance bail.