After studying with his father in Pondok Bendang Daya, he went to Mecca to continue his education. While he was there, he developed a reputation as an expert in fiqh and he remained there and taught for the entirety of his life.