Muhammad ibn Abd al-Rahman al-Gashtuli al-Jurjuri al-Azhari Abu Qabrayn (Arabic: محمد بن عبد الرحمن القشطولي الجرجري الأزهري بوقبرين; died in 1793/1794), mostly known as Sidi M'hamed Bou Qobrine (Arabic: سيدي محمد بو قبرين) was a Berber 'alim, founder of the Rahmaniyya Sufi order and is one of the seven Patron Saints of Algiers. The Sidi M'Hamed District in Algiers and the municipality of the same name, Sidi M'Hamed, are both named after him.
Muhammad was born to the Berber Ayt Smail tribe of the Gashtula tribal confederation in the Djurdjura, Kabylie. After studying at his home, he went to Algiers to continue his studies. In 1740, he went to make the pilgrimage to Mecca. Returning from the pilgrimage, he stayed in Cairo, where he studied in the Al-Azhar madrasa. It was in this madrasa that he was initiated to the Khalwatiyya order under his teacher Muhammad ibn Salim al-Hafnawi. Under his teacher's orders, Muhammad started propagating the tariqa to India and the Sudan. After thirty years, he returned to Algeria, where he started preaching it among his people and founded a zawiya in his natal village.
He died in 1793/1794.
- Bentaleb, Mohamed (August 16, 2011). "Sidi M'hamed Bou Qobrine le saint aux deux tombeaux". El Moudjahid. Retrieved May 3, 2013.
- Clancy-Smith, Julia A. (1997). Rebel and Saint: Muslim Notables, Populist Protest, Colonial Encounters (Algeria and Tunisia, 1800-1904). University of California Press. p. 40. ISBN 978-0-520-21216-9.
- Margoliouth, D.S. (1995). "Raḥmāniyya". In Lewis, B.; Ménage, V. L.; Pellat, C.; Schacht, J. (eds.). Encyclopaedia of Islam. Vol. VIII (2nd ed.). Leiden, Netherlands: E. J. BRILL. p. 399. ISBN 9004098348.