All perfect praise be to Allah, The Lord of the Worlds. I testify that there is none worthy of worship except Allah, and that Muhammad is His slave and Messenger.
The Hadeeth which you referred to in the question was narrated by Abu Hurayrah who said: “The Messenger of Allah, sallallahu ‘alayhi wa sallam, said: “Whoever enters a horse (in a race) between two other horses, not knowing whether or not it will win, that is not gambling. But whoever enters a horse (in a race) between two other horses, while he is certain that it will win, then that is gambling.” [Abu Dawood, Ibn Majah, Imam Ahmad in (Al-Musnad) and Al-Hakim in (Al-Mustadrak)]. However, Sheikh Al-Albani classified it as Da'eef (weak).
On the assumption that the Hadeeth is authenticated, it means if the race was between two and the prize was from both of them, then this is gambling. But if they enter a third horse with them (in the race), provided that horse is equivalent to their two horses, and can win the race, and the third man did not participate in setting the prize, then there is nothing wrong with that. Moreover, whoever (of the three competitors) wins the race takes the prize. The third one who did not pay anything in participation in the prize is called the Mohalil (legitimizer). But if the horse of the third man was weak, slow, and cannot win (the race with the other two horses), then there is no consideration for entering it in the race and the competition is deemed gambling even if they entered it in the race. This meaning was briefly mentioned by As-Sindi in his footnote on Sunan Ibn Majah.
Therefore, there is an elaboration regarding the competition, which we brief as follows:
- If the competition is not for a compensation, then it is permissible. But if the competition is for a compensation, it is permissible in some cases and it is forbidden gambling in other cases. The cases in which the competition for a compensation is permissible are as follows:
1- If the prize is from a donor other than the competitors, such as a given person or company saying to the competitors: “Whoever wins between you two will have such amount of money.”, as a donation from him/it; in this case, there is nothing wrong with that.
2- If one of the competitors takes out money and says to his friend: “If you win, this money is yours. But if I win, then you owe me nothing and I owe you nothing.” In this case, the prize is set by only one party not both parties.
3- If the prize is set by the competitors, whereby each participant pays a part of the prize, then this case is not valid, and it is prohibited gambling unless they enter a Mohalil (a legitimizer).
This is when they enter with them a competitor who has an equal opportunity to win and take the prize without him paying anything. This is what is indicated in the Hadeeth on the assumption of its authentication. This opinion was adopted by some scholars.
For more benefit on the ruling on competition prizes and horse racing, please refer to Fatawa 3381 and 87600.
Allah knows best.