A 3-year-old boy was killed Monday when he fell into a grease trap behind a Tim Hortons in upstate New York, authorities said.

The child walked over the trap — which resembles a manhole cover and tops the vat where used cooking oil is collected — behind the Tim Hortons in Rochester at about 11 a.m. ET, police said.

When first responders arrived, the boy had been pulled out and was on his back with an adult performing CPR, police said.

Police examine the area where a 3-year-old boy fell into a grease trap in Rochester, New York. Jennifer Lewke / WHEC

The child was rushed to Strong Memorial Hospital where he was pronounced dead at noon.

"Our hearts go out to the family of this child who had to suffer this unimaginable tragedy," Rochester police Investigator Rick Camp said.

Police are investigating how the lid had come loose, allowing the child to fall in.

A rep for Tim Hortons could not be immediately reached for comment Monday.