Hazrat Hajib Shakarbar was born in the year 1213 AC (590 Hijri). When he was 14, he earned the title of Shakarbar (one who cause a rain of sugar or, one for whom sugar is rained), because he had caused such a downpour by praying to Allah in favour of a poor old woman near Sabzwar in 1227.
In 1235, when he was on pilgrimage to Makkah, by Providential Coincidence, he became the gatekeeper of the Grand Mosque there and came to be known as Hajib, as the gate keepers of the Grand Mosque used to be called Hajib-i-K’aba. Three years later when he returned home after relinquishing the post to the legally appointed person, he was received outside the city of Sabzwar with the shouts of Hajib. The new title, holy as it was, took precedence over his former title of Shakarbar and he came to be known as Hajib Shakarbar. This combination of his titles became so popular that his original birth names soon went into oblivion.