After more than a week trapped deep inside of a narrow borehole well, a terrified puppy has finally been brought to safety — ending his unimaginable ordeal which gripped an entire nation.

Istanbul Fire Department

It's unclear how the young dog ended up within the well in the town of Beykoz, Turkey, but residents were alerted to his predicament by the sound of whimpering. One look at the narrow space made clear that he could never escape on his own. The earthen hole, while just under a foot in diameter, dipped more than 200 feet below the ground.

While helping the pup might have at times seemed impossible given the circumstances, rescuers alerted to predicament refused to give up trying.

Twitter/Barış Şengün

Emergency crews, made up of local firefighters and animal rescue organizations, were called in to assess the situation. They put up a tent around the hole to prevent rain from entering, and lowered down camera equipment to check on the puppy's condition.

Istanbul Fire Department

The puppy, though scared and alone, was still very much alive.

Twitter/Barış Şengün

Rescuers were able to give the puppy food to stay alive — but getting him out would be far more challenging. For 10 long days, crews struggled to devise a way to lift the dog out, though without luck.

The rescue effort soon garnered widespread attention in Turkey via social media and national television. Hope came when Energy Minister Berat Albayrak heard about the puppy's plight and, as the Daily Sabah reports, ordered a state-owned mining company, Turkish Hard Coal Enterprises, to step in to help.

Using a long, mechanized lasso lowered into the hole, the team finally managed to collar the puppy and pull him up to safety — a dramatic moment caught on film.

After more than a week, the puppy was freed — an outcome that, at times, seemed to hinge on the thinnest of possibilities.

Istanbul Fire Department

The lucky young dog, who has since been named Kuyu (Turkish for 'well'), was examined by veterinarians and found to be in good health — but his story gets even better yet.

Firefighters from Beykoz have adopted the pup and invited him to live at their station, ensuring that Kuyu will be rescued for a lifetime, too.