The following is excerpted from Sharh Sahih Muslim of Imam al-Nawawi:

…Mu’tamar narrated; from Isma‘il who said: I heard Qays reporting from Abu Mas‘ud: The Prophet pointed with his hand towards Yemen and said: “Faith is right there, while cruelty and hard-heartedness are among the camel breeders, at the end of camel’s tails, where Satan’s two horns rise, in Rabi‘ah and Mudar.”

…Muhammad narrated from Abu Hurayrah: Allah’s Messenger said: “Here come the people of Yemen, and they are softer of heart. Faith is Yemeni, knowledge is Yemeni and wisdom is Yemeni.”

…from Abu Salih from Abu Hurayrah: Allah’s Messenger said: “The people of Yemen are coming to [visit] you. They are softer of heart and more gentle. Faith is Yemeni and wisdom is Yemeni. The head of disbelief is towards the east.”

[Imam al-Nawawi comments:] This chapter includes thirteen hadiths all of which are variations of the same hadith that attaches faith, knowledge of Islam and wisdom to Yemen and its people.Some of these versions ascribe certain other characteristics to other areas…Qadi ‘Iyad put them together, and subsequently Shaykh Abu ‘Amr ibn Salah summarised and clarified them…

The Prophet then mentions that both knowledge and wisdom are Yemeni. In this instance knowledge expresses the Arabic word fiqh. Abu ‘Amr ibn Salah said:

‘As for fiqh and wisdom, the word fiqh here means understanding the Islamic faith. Scholars of fiqh and usul al-fiqh, or legal theory, later gave the word a more specific meaning, which is understanding the practical rulings of Islam through the evidence on which it is based. Wisdom, on the other hand, is given numerous definitions which are at times rather confusing. Everyone who gave a definition actually highlighted some of its aspects. We may say that wisdom is ‘knowledge that incorporates rules and regulations, provides a clear concept of Allah, the Blessed, the Sublime, and coupled with profound insight, self-discipline, identification of what is right and implementing it, and prevention of the pursuit of self-interest and falsehood.’ A wise person is one who combines this. Abu Bakr ibn Durayd said: ‘Every word that admonishes or restrains you, or encourages you to noble action, or dissuades you from an unbecoming one is wisdom. It is in this light we understand the Prophet’s description: “Some poetry is wisdom”.’ But Allah knows best.

The Prophet describes the people of Yemen as ‘gentler and softer of heart’. The Prophet uses with each quality of gentility and softness a different word that means ‘heart’. This is a more eloquent way than repeating the same word. What he meant by describing them as gentle and soft-hearted is that they are amenable, quick to respond to reminders, free of the hardness and cruelty which mark the hearts of others mentioned in some versions of the hadith.

…The Prophet’s description further adds: ‘at the end of camel tails, where Satan’s two horns rise, in Rabi‘ah and Mudar’…The reference to Satan’s two horns mean the two sides of his head. However, scholars say that the expression refers to Satan’s troops that try to lead people astray, or to two major communities of unbelievers who support him. The hadith means that the east is particularly prone to Satan’s seduction and, as such, there is more disbelief there. The Prophet says in another hadith: ‘The head of disbelief is towards the east’. This was the case during the Prophet’s lifetime and it will be the case when the false Messiah comes from the east. In between these two times, great episodes of strife will start there, and from there great forces of unbelievers will launch attacks…’

[Sahih Muslim With the Full Commentary by Imam al-Nawawi, volume 2, translated and edited by Adil Salahi, Islamic Foundation, Markfield, 2019, pp. 17-25]