The 25 officers went to the center at about 9.45pm and arrested the 23, who included four boys aged 13 to 17, sources said.
They were holding mourning rituals marking the anniversary of the martyrdom of Imam Hussein (AS), the third Shia Imam.
Those arrested were brought to the Islamic complex at Gombak and were told that they were being investigated under shariah law for opposing the fatwa on the practice of Shia Islam, the sources told Free Malaysia Today.
They were released at 5am after being told that they could be summoned again any time, the sources added.
Earlier on Friday, religious authorities in Selangor asked mosques to call in sermons on their congregations to be vigilant over the spread of Shia Islam.
The minority Shia community in Sunni Muslim-majority Malaysia has been subject to discrimination and persecution by authorities, human rights groups have said.
State religious departments have raided the community’s places of worship and made arrests.
JAIS said in a weekly sermon that Muslims should not be influenced by practices of the Shia Islam.
Sermons in Malaysia are standardized, and Islamic leaders typically deliver their Friday sermon in mosques based on the weekly sermon issued by the state religious department.
JAIS is the Islamic religious authority in Selangor, Malaysia’s richest state. It is funded by the state government.
Isham Pawan Ahmad, an associate professor at the International Islamic University near Kuala Lumpur, told Reuters the sermon delivered at a mosque he went to in Selangor on Friday was similar to the one issued by JAIS.
“This is the most vehement comment on Shias in Malaysia. It makes them a target,” Isham said.
Malaysian Shia Muslims have complained about their inability to worship freely, and that they may face obstacles in carrying out rituals which are both cultural and religious, the UN special rapporteur in the field of cultural rights said in a preliminary report in 2017.