A California man with only $6 in his pocket lost his dog last week when he was arrested for marijuana (he later showed he had a prescription). Heartbroken, he visited the animal shelter everyday where the dog was impounded — and one woman who spotted him crying at the cage changed everything for him.

Viral Facebook Photo Helps San Bernardino Man Dave Thomas Get His Dog Back From Shelter

Dave Thomas with his dog Buzz. (Photo: Maria Sanchez/Facebook)

Dave Thomas from San Bernardino told the San Bernardino Sun “it made [him] crazy” that he couldn’t afford the $400 it would cost to release the pit bull mix named Buzz Lightyear.

When Maria Sanchez, a woman the Sun reported visits the shelter daily to take photos for awareness efforts, posted a picture of Thomas and Buzz holding hands (er, hand and paw) at the cage, it went viral. Not only did Thomas receive enough money to free Buzz — $2,000 was raised as of Tuesday — but the Sun noted it also resulted in a job offer and a marriage proposal.

Viral Facebook Photo Helps San Bernardino Man Dave Thomas Get His Dog Back From Shelter

Maria Sanchez with Thomas (Photo: Gabriel Luis Acosta/San Bernadino Sun)

“It’s just incredible,” Thomas told the Sun. “I believe it’s for my dog and not me.”

Watch this report from KTLA:

But there was a twist when it came to the donations pouring in — where to find the man who left none of his information with the shelter. The Sun reported that some were incorrectly stating Thomas was homeless, which is not the case.  That’s where the photo took another viral turn. Instead of raising money, it was shared by more than 3,500 people on Facebook to see if anyone could help find Thomas, the Sun reported. It was reporters who were able to locate him.

Watch KABC catch up with Thomas earlier this week:

Thomas was hoping to get Buzz back Tuesday, but the Sun reported that the shelter wouldn’t release the dog until he was neutered. KTLA reported that Buzz would be able to go home Wednesday.

Viral Facebook Photo Helps San Bernardino Man Dave Thomas Get His Dog Back From Shelter

Thomas with still at the shelter. (Photo: Gabriel Luis Acosta/San Bernadino Sun)

The Sun reported that Thomas was arrested last week for possession of marijuana, but also noted he showed papers indicating he was allowed to use the drug for medicinal purposes. Thomas was initially stating he was arrested for failing to appear in court over traffic tickets, but law enforcement said this was not the case.

Police told the Sun removal of the dog was standard procedure as there was no one around to take care of it upon Thomas’ arrest Friday.

The San Bernardino Sun has more heartfelt pictures of Thomas with Buzz and his reaction to the outpouring of support he has received here.

Watch this footage of Thomas after he had found out he would be able to get Buzz back: