SAN DIEGO — A video of a man playing with a dog before police say he stole a bike from a Pacific Beach garage has resulted in an arrest, authorities said.

A 42-year-old San Diego man was arrested on suspicion of bicycle theft, San Diego Police Department said in a post on its Instagram Sunday.

In early August, police released video of a man who they say entered a garage and got away with a 2019 black Electra three-speed bicycle, which costs around $1,300. Police say the theft happened around 10:30 p.m. on July 15.

In the video, the man is seen starting to leave with the bike until the household dog appears in the garage and approaches the suspect, who then parks his bike and begins to pet the dog.

“You’re the coolest dog I’ve ever known, I love you too,” the man is heard saying to the dog.

About a minute later, the suspect leaves the scene after one last pet.

“We’re thrilled to report the bicycle is back home, much to the delight of Ace, a very good boy. This success underscores the power of community collaboration. Thank you for helping keeping our city safe!” SDPD said.