He said Muslims in the country were now faced with their biggest challenge because of disunity among themselves, which might cause them to lose power in their own country.
"I am not being racist in raising the anger among Muslims about this but there are our rights that should be respected by others. Respect will be there only if we are in power.
"Today, although Islam calls us to be united, we are split, and it might reach a level where we might lose power," he said at the Muslim Welfare Organisation of Malaysia's (Perkim's) breaking-of-the-fast and presentation of excellence awards function, here Tuesday.
He was referring to the recent incident where the name of Penang Chief Minister Lim Guan Eng was mentioned in a Friday sermon in some mosques in Penang but the name of Yang di-Pertuan Agong Tuanku Mizan Zainal Abidin was dropped.
Dr Mahathir, who is also Perkim president, reminded Muslims to rethink their responsibilities to the religion even if their responsibilities to race were no longer a priority.
He said that although Muslims were the majority in the country, it was not impossible for Islam to lose its status as the official religion if solidarity among Muslims continued to weaken.
"When we (Muslims) quarrel among ourselves, others will use the opportunity to gain the upperhand, maybe even assume power in the country.
"Don't think one day it will not be possible for Friday sermons to be mentioning the name of a non-Muslim leader because they are in power and we are weak," he added.
The awards were presented to four of Perkim's clubs at local universities.