A Texas toddler was found safe early Monday after his parents left him inside an unlocked, running car that two men subsequently stole while the couple gambled inside a gas station, investigators said.

The 16-month-old child was left sleeping inside a Chrysler 300 outside a Shell Gas Mart in Humble, northeast of Houston, around 11:30 p.m. Sunday, the Harris County Sheriff’s Office reported in a news release.

Kimberly Cook, 21, and Anthony Blue, 29, initially told deputies they left their child in the car to run into the convenience store, and when they came out, the vehicle was gone.

TEXAS MAN CHARGED WITH MURDER AFTER 10-MONTH-OLD BABY 'CRAMMED' IN BACKPACK DIES IN CAR

However, deputies said they learned the couple actually had been gambling on 8 liner machines for close to 30 minutes and periodically checked on the child, Fox 26 reported.

Two men, later identified as 19-year-old Jabari Davis and 18-year-old Vincent Cannady, had taken the opportunity to steal the still-running car while the couple were busy gambling inside, deputies alleged.

A park ranger found the child abandoned and unharmed in Houston's MacGregor Park, about 20 miles away from the gas station, shortly after he disappeared, Sgt. Ben Beall told KHOU-TV.

"He saw what he first mistook to be an animal, a small animal, walking through the parking lot," Beall said. "Turned out to be our 16 month-old child. The child was wearing a onesie, shivering cold."

The child was taken to a hospital for observation and later placed in the care of his grandparents, deputies told local media.

TEXAS MAN WITH LICENSE TO CARRY SHOOTS, KILLS SUSPECTED ROBBER AT HOME COOKOUT

Deputies spotted the Chrysler 300 moments after finding the child, but the driver sped away, initiating a short chase, Beall told the Houston Chronicle.

The driver eventually stopped and deputies arrested Davis and Cannady without incident.

The two were charged with auto theft and kidnapping. Cannady's bond was set at $75,000 and Davis' bond was set at $40,000, Fox 26 reported.

CLICK HERE FOR THE FOX NEWS APP

Meanwhile, Cook and Blue were charged with child abandonment for leaving the toddler unattended. Their bond was set at $10,000 each.