Later he studied religion from his grandfather Sheikh Tuanku Pariaman in Koto Tuo.
Kemudian ia belajar agama dari kakeknya Tuanku Syeikh Pariaman di Koto Tuo.