A 32-year-old Philadelphia man was arrested Tuesday after he left his 7-year-old boy unattended in a car parked outside Parx Casino in Bucks County for almost three hours while he played blackjack, police said.

Bryan Bolds, of the 4200 block of Passmore Street, was arrested on the floor of the Bensalem casino just before 6:30 p.m.

"The father gambled from about 3:30 p.m. until 6:30 p.m. when we arrested him on the floor," said Lt. William McVey of the Bensalem Township Police Department.

Police were alerted by a passer-by who noticed the child sitting alone. When police approached the vehicle, "The kid was in the back, screaming and yelling for Daddy," McVey said.

McVey said police officers originally planned to wait by the car for Bolds to return before arresting him, "but then we were able to identify who he was through the vehicle, through the child," McVey said. "It didn't look like he was making any attempts to leave so we saw enough. It was time to lock him up."

The boy was taken to police headquarters for safety and did not suffer any injures, "but was a little shook up, obviously," McVey said.

Bolds was charged Tuesday night with endangering the welfare of a child, McVey said.