Upon returning to Perak in 1911, Sultan Idris health was under par and he rested at Port Dickson. Whilst recovering, he made a nazar, should he be restored a good health, he would build a mosque in Bukit Chandan. His vow later materialised with the erection of Ubudiah Mosque but he did not live to see it completed.