The girl replied it was simply by "Making constant prayer for God to bless the best of creation by the number of breaths and heartbeats." Al-Jazuli then resolved to write a work collecting litanies of prayers asking God to bless and show mercy and kindness to Muhammad.
Dalail al-Khairat is a famous collection of prayers for the Islamic prophet Muhammad, which was written by the Moroccan Sufi and Islamic scholar Muhammad Sulaiman al-Jazuli ash Shadhili (died 1465).
The legend behind the origin of the Dala’il al-Khayrat is that al-Jazuli once awoke late for his morning prayers and began to look in vain for pure water to perform ritual ablutions.
In the midst of his search al-Jazuli encountered a young girl who was aware of al-Jazuli's famed religiosity and was bewildered on why al-Jazuli could not find pure water.
The girl then spat into a well which miraculously overflowed with pure sweet water for al-Jazuli to perform ablutions.
Consequent to performing prayer, al-Jazuli inquired to the means by which the girl achieved such a high spiritual station.
It is popular in parts of the Islamic world amongst traditional Muslims - specifically North Africa, the Levant, Turkey, the Caucasus and the South Asia and is divided into sections for daily recitation.
The full English translation of the title is (Way-marks of Benefits and the Brilliant Burst of Lights in the Remembrance of Blessings on the Chosen Prophet).