SAN FRANCISCO (CBS SF) — After an epic five-hour chase across train tracks and around parked cars by four officers near San Francisco’s Oracle Park, plus some intensive detective work, Nieve, a fluffy white terrier mix, was reunited with her family Friday.

The case began when the animal control unit got a call about a small white dog on the train tracks at Fourth Street and Townsend streets on July 7, according to Deb Campbell, a spokeswoman for San Francisco Animal Care & Control.

READ MORE: PG&E Says Light Rain After Long Drought Led to Lights-Out Across Bay Area

Four Animal Control officers raced to the rescue, but the frightened dog apparently mistook them for dognappers and fled. She eluded Capt. Amy Corso, Lt. Ellie Sadler, Officer Rebecca Fenson and Officer Shane Jolley for five hours despite her senior status as an 8-year-old dog, according to Campbell.

Dog Catcher

Animal rescue officer attempts to catch a small white dog in San Francisco. (Muttville Senior Dog Rescue Photo)

Finally trapping the dog behind a parked car, the officers scooped her up in a net and brought her to the city animal shelter. After following the usual procedures for lost animals, the senior dog was transferred to next-door neighbor Muttville Senior Dog Rescue in San Francisco’s Mission district.

And then the miracle took place.

READ MORE: Flames Reach Ancient Sequoias; Crews in Pitched Battle to Save Giant Forest Grove

The dog looked familiar to Alice Ensor, an adoption counselor at Muttville, and she combed social media for lost dog posts that went up around the time Animal Control picked up the dog, according to Patty Stanton of Muttville.

Nieve, a fluffy white terrier mix, was reunited with its owner, a Vallejo man on Friday. (Muttville Senior Dog Rescue Photo)

The counselor found a lost-dog alert that had been posted around that time for a white terrier mix named Nieve who escaped or was stolen July 6 when her owner, a Vallejo man named Carlos, was working in Mission Bay, Stanton said.

On Friday, July 23, Nieve was reunited with Carlos and his son.

“It’s amazing someone didn’t take her home or she didn’t get hit by a car but most people have a good heart and someone must have said ‘Let’s call the shelter,'” Stanton said.

MORE NEWS: Woman Fatally Shot, Another Wounded Outside Pittsburg 7-Eleven Store

© Copyright 2021 CBS Broadcasting Inc. and Bay City News. All Rights Reserved. This material may not be published, broadcast, rewritten or redistributed