Police have arrested a 26-year-old man they say tried to abduct a 3-year-old boy in a stroller in Brooklyn before he was chased off by the toddler’s grandmother, according to a report.

Omar Dominguez of Brooklyn was charged Thursday with kidnapping, attempted kidnapping, petty larceny and acting in a manner injurious to a child under 17.

The boy and his 63-year-old grandmother were in front of the Thanksgiving Supermarket on 86th Street in Gravesend about 3:50 p.m. Monday when the stranger snatched the stroller and walked off.

But the grandmother quickly noticed and gave chase, scaring off the man, authorities said.

Hours later, a woman spotted the suspect in surveillance video released by police and called 911 from a nearby business, WABC reported.

Police responded and took the man into custody shortly before midnight Wednesday.

Dominguez was being held at the 62nd Precinct on Thursday morning.