Media cited local residents as saying the gunman reached the congregation hall by taxi and was stopped at a volunteer checkpoint. A gun battle erupted when police arrived at the site, with five killed and five others wounded.
"[The] person who opened fire on a husseiniya was killed, and the attacker was in his twenties," Al Arabiya quoted sources as telling a local news broadcaster.
A statement distributed by the self-proclaimed Islamic State terror group later claimed responsibility for the attack.
"With the approval of God Almighty, the soldier of the caliphate Shuja al-Dawsari, may God accept him, set his kalashnikov upon one of the apostate polytheists' temples," the statement read. according to Reuters.
Two suspected accomplices to the killed shooter were arrested.