Quran is not opposed to keeping dogs and in fact mentions dogs as pets:
18:18 “You would think that they were awake, when they were in fact asleep. We turned them to the right side and the left side, while their dog stretched his arms in their midst.”
18:22 “Some would say, they were three; their dog being the fourth, while others would say, Five; the sixth being their dog, as they guessed. Others said, seven, and the eighth was their dog. Say, My Lord is the best knower of their number. Therefore, do not argue with them; just go along with them. You need not consult anyone about this.”
5:4″They consult you concerning what is lawful for them; say, Lawful for you are all good things, including what trained dogs and falcons catch for you. You train them according God’s teachings. You may eat what they catch for you, and mention God’s name thereupon. You shall observe God. God is most efficient in reckoning.”
It is very likely that Prophet Muhammad’s order to kill dogs, quoted by many to prove that Islam is against keeping dogs as pets, was a temporary one. Some Ahadith seem to suggest that there was an abundance of stray dogs in Medina and the idea was to reduce their population. How is this any different than our county governments putting dogs to sleep or to allow a hunting season for killing deer?
There are also Hadiths which prove that Prophet Muhammad did not hate dogs.
Volume 4, Book 54, Number 538:
Narrated Abu Huraira:
Allah’s Apostle said, “A prostitute was forgiven by Allah, because, passing by a panting dog near a well and seeing that the dog was about to die of thirst, she took off her shoe, and tying it with her head-cover she drew out some water for it. So, Allah forgave her because of that.”
This is what Montgomery Watt says about him: “He was able to enter into the spirit of childish games and had many friends among children. He had fun with the children who came back from Abyssinia and spoke Abyssinian. In one house in Medina there was a small boy with whom he was accustomed to have jokes. One day he found the small boy looking very sad, and asked what was the matter. When he was told that his pet nightingale had died, he did what he could to comfort him. His kindness extended even to animals, which is remarkable for Muhammad’s century and part of the world. As his men marched towards Mecca just before the conquest they passed a bitch with puppies; and Muhammad not merely gave orders that they were not to be disturbed, but posted a man to see that the orders were carried out.”
I think this is ample proof that Prophet Muhammad did not hate dogs and in fact was more kind to animals than most people in his day.