Sorry to hear about this problem, but I need to collect some information to be able to assist you.
What breed is your dog?
Is he stiff in the back end?
Can he walk up stairs or jump?
Was he exercising before this happened?
Can you tell me what breed your boy is? Joan
The panting and stiffness is definately a sign of pain. I suspect that while he was out side he may have injured his back running around. What I suggest for tonight is heat on his back. You can make a rice sock, by placing uncooked rice in a sock, tie it off, and heat in the Microwave for 2 mins. Wrap it in a mosit towel and apply to your boy's back. This should offer some relief. Please keep him subdued or rested in a crate. There is nothing that is really safe to give him for pain that is over the counter. The rest and heat should help until you can get him into the Vet in the AM.Chihushuas have a few issue with their knees, but this sounds like a back issue. If he seems to get worse tonight and the pain gets more severe, then you may wat to consider an ER Vet visit. Joan
The moist heat should help, but he needs to be kept as quiet as possible. Your Vet can give a shot and proper medication to help him in the AM. The heat tonight and rest, rest and more rest will allow him to take the pressure off his spine and legs. Please let me know if you need more help. Joan