Sources and context
First of all the hadith is the same -with a difference in order- for all sources however the used translations -at least on sunnah.com- are:
The Prophet (ﷺ) said: Wagers are allowed only for racing camels, or horses or shooting arrows. (Sunan abi Dawod)
That the Prophet (ﷺ) said: "No stake is acceptable except in archery, racing a camel, and racing a horse." (Jami' at-Tirmidhi)
"There should be no awards (for victory in a competition) except on arrows, camels or horses." (Sunan an-Nasa-i here and here)
“There should be no prizes for racing except races with camels and horses.” (Sunan ibn Majah)
Both abu Dawood and imam at-Tirmidhi quoted the hadith in a chapter entitled as "Jihad" to clarify the context this was also the choice of ibn Majah, while an-Nasa-i chosed to name a chapter "the book of horses".
We must be aware these kinds of "sportive activities" are regarded as useful leisure and exercise for Muslims.
See also: What is the modern-day applicability of "teach your children... horse riding"?
The reason why it is recommended is that these kinds of activities were regarded as a kind of training for Jihad.
It can also be understood as means to show power and be prepared against the enemy in the context of verse (8:60):
And prepare against them whatever you are able of power and of steeds of war by which you may terrify the enemy of Allah and your enemy and others besides them whom you do not know [but] whom Allah knows. And whatever you spend in the cause of Allah will be fully repaid to you, and you will not be wronged.
The hadith also appears in Musnad Ahmad and Mosannaf ibn abi Shaybah.
What is illegal about prizes and why?
Prizes as understood in this context can either be an award for the winner of a competition either provided by third party or by the loser or a kind of entry fee for example.
In some cases these competitions could therefore be gambling or alike and this would make the competition haram. As gambling is haram per qur'an (5:90-91).
Therefore generally the case of entry fees or prize paid by the looser of such a competition is the most delicate because outside of the range of what is applicable for this hadith it should be gambling.
On the other hand the permission to pay the prize by one ore more of the competitors in case of more than two competitors in the context of the hadith is a matter of discussion among scholars.
Therefore the most safe prizes are those paid by a third party which is not part of the competition.
Further sheikh al-Albani when asked about the hadith said that anything which has a similar goal as racing with horses, camels or archery, like for example training with some kinds of weapon could be regarded as halal based on the analogy of this hadith.
However he sees a clear issue with competitions for example in religious knowledge. As it is not good to rise our children to learn their religion only for a compensation!
As for dar al-Ifta' from Jordan they've shared a fatwa according which a competition of which the prize is paid by a third party be it the government or the ruler are permissible in the fatwa chess, football and sportive competition in which the body is trained are mentioned. (See here)
A similar statement appears with detailed conditions in the fatwas islamqa #218489 on running competitions.
This would fit the literal meaning of the sahih hadith:
A strong believer is better and is more lovable to Allah than a weak believer, and there is good in everyone, (but) cherish that which gives you benefit (in the Hereafter) and seek help from Allah and do not lose heart, and if anything (in the form of trouble) comes to you, don't say: If I had not done that, it would not have happened so and so, but say: Allah did that what He had ordained to do and your" if" opens the (gate) for the Satan.
(Sahih Muslim and Sunan ibn Majah)
Some of the lessons learnt from this hadith are:
- Gambling, betting, and taking risks are all forbidden, especially if they are for a compensation or award.
- The Shariah permitted competitions if it was something that aided in jihad in the cause of Allah and the victory of his religion.
- This hadith indicates that betting and taking risks are not permissible except in three things: racing with camels, racing with horses and archery, which are matters that are used in the war against the infidels and jihad in the way of Allah, and all that have the meaning of war machines and the like are included in the hadith.
- The explanation of sheikh al-Albani in Arabic language (see here).
- A fatwa on donation for a horse races on islamqa #180999 only available in Arabic.
- Fatwa islamweb #87600 "Betting on horse riding and camel racing"
- Another explanation of the hadith in Arabic (See here)
- Rule on prizes for competion islamqa #114530 (Football competition)