Shlomo Aben Danan was born in Fes on Shabbat, 9 Sivan 5608 (1848).
"The records of the Ibn Danan (Aben Danan) family date back at least to the 14th century, though some family traditions are even older," reports the Encyclopedia of Jews in the Islamic World.
"Either in 1438 or in 1465, Maimon ibn Danan fled Fes during a pogrom and settled in Granada," the encyclopedia states.
Noticing his son's exceptional abilities from an early age, his father, Rabbi Moshe, entrusted his education to the finest teachers of Fes. But when Shlomo was 10 years old, his father departed this world, leaving behind an orphaned son. The young man's education was then entrusted to his grandfather, Rabbi Shmuel, and his uncle, Rabbi Yitzchak, a great scholar who shared everything he knew with Shlomo.
"Rabbi Shlomo's childhood was very difficult.
Despite this enormous tragedy and the pain he experienced from the loss of his beloved father, the boy did not abandon his study of Torah.
At the age of 30 he became head of the rabbinical court of Fes.
Rabbi Shlomo was only 17 years old when he began studying Kabbalah.
"Possessed of superb intellect, at the age of 18 he began giving the young men of Fes lessons in the same spirit as in the yeshivas, thereby guiding them in the study of Talmud and Halacha."
Rabbi Shlomo Aben Danan then fulfilled his childhood dream of visiting the Land of Israel. In 1875, when he was only 27 years old, he set out on the long journey with his uncle, Rabbi Yitzchak Aben Danan.
Upon his return to Fes he was appointed treasurer and head of the community.
"The Moroccan government, aware of the immense respect people had for him, confirmed his appointment as chief rabbi and head of the court, granting him the authority of an official judge," wrote Chevrat Pinto.
Rabbi Shlomo held this position for 50 years. He was known for recording every one of his rulings and decisions.
In 1901 he published a collection titled "Asher LeShlomo", in which he documented "all the halachic questions that were brought to him, directly or indirectly, from communities across North Africa, from the cities of Sla, Rabat, and even Gibraltar."
His place of prayer in the "Aben Danan" synagogue has been preserved to this day.
In 1920 he was appointed by the court of Rabat to replace Rabbi Raphael Encaoua, the first chief rabbi of Morocco. A year later he returned to Fes to resume his post. Rabbi Shlomo passed away in Fes between 1927 and 1928, leaving the community without a leader.
Shlomo was deeply saddened by his grandfather's passing. Having no one to turn to after his mother scolded him for some minor misdeed, he went one night to his father's grave. There he burst into bitter tears and cried out to his father: "Abba, I know I made a mistake for which Mother reprimanded me. But I am in pain, and I have no one to turn to but you. I regret the mistake I made, and from now on I want to follow the path of our holy Torah and our righteous ancestors, the Aben Danan family. I want to proudly bear the name of this family." Having calmed down, he returned home. No one noticed his absence. That night his father appeared to his mother in a dream and said: "Dear wife, you must not feel alone and upset over the raising of our dear son Shlomo. From now on you will not need to punish him; the Almighty will support you and help you in all your personal needs. And our son is blessed by the Aben Danan family here in Heaven, and is destined for greatness."
The dream frightened the mother, who the next morning went to her husband's grave to light a candle there, as is customary among Moroccan Jews. She returned home and spoke with her son Shlomo, who asked forgiveness for his misdeed. From that day on, mother and son were close, and nothing stood in the way of his rising along the path destined for him.