A dog rescued from a drainage pipe in Montgomery County, Md., on Friday afternoon apparently is the same animal that had been saved from a slaughterhouse in Asia and then disappeared last year from its new home in the county.

It was not clear Friday night, however, whether the rescue operation in the Bethesda area would finally end the hazards and hardships that, by all accounts, have characterized the life of the dog, a Wheaten Terrier or terrier mix known as “Cookie” and also “Mai Tai.”

A Facebook posting from a group that says it rescues Wheaten Terriers said Friday night that the person who had adopted Cookie “has turned him back over” to the organization “for his safety.” The rescue group , S’Wheat Rescues & Adoptions, said on Facebook that it has “moved him to a foster home” while working on a permanent placement.

“So wonderful!!!!!” read one comment posted on the Facebook site, referring to the rescue. “ AMAZING!!! So glad he was found safe!!” read another. “ IS THIS REAL!?!? So many people searched and prayed for this guy!!” said yet another commenter.

Since Oct. 22, 2014, Cookie had been listed online as missing from a home in Kensington, apparently that of the person who adopted him after he was brought from Thailand. A posting described him as a soft-coated Wheaten Terrier mix, mainly brown with some tan or cream coloring and weighing 20 to 39 pounds.

At one point Friday, a spokesman for the county fire and rescue service said he had understood that Cookie was to be reunited with his original owner. That owner could not be reached Friday night for comment.

It was midafternoon Friday when dogs in the 7800 block of Lonesome Pine Lane alerted owners to something unusual in a drainpipe under the roadway. The dogs’ barking alerted owners to the presence of a dog in the pipe. Rescue personnel were called.

The rescuers cut open gratings and then used a fire hose padded at the end and stiffened with compressed air to gently nudge the dog along the drainpipe to where it could be captured.

It looked more than a little the worse for wear, said county fire and rescue spokesman Pete Piringer.

In an interview Friday night, Karene Nethery-West, a leader of a dog rescue organization, said Cookie had been saved in Thailand from the dog-meat trade. But she said the dog was then placed in a Thai shelter where still other perils awaited.

She said her rescue group is separate from the one that said it had received the dog Friday. Nethery-West said her group raised funds to bring Cookie to this country and place him in a loving home.

She said she was “so thrilled that he’s safe.” But she said she would welcome the opportunity to know more about where Cookie had been and where he would be going.