 According to a legend , in 1421 an Islamic trader named Ayuba had a dream while staying here , near a " Mystic Stone " , instructing him to build a mosque . Strangely , when he awoke , he found that the foundations were already in place and he proceeded to construct the mosque until it was completed . It is believed that Ayuba 's remains are buried under a baobab tree , next to the mosque . 
