"The man used to come to view jihadist websites and the dispute was prompted by the internet cafe owner's decision to prevent him this time from viewing such propaganda material," said the official.
Hasan al-Rashedi, Al Jazeera's Moroccan office chief, said it seemed that the bombers were in the cafe to get orders over the internet about a planned attack.
Morocco has said it had information about an al-Qaeda plot to mount an attack but that the circumstances of the latest blast were not clear.
Another man who tried to leave the scene of the bombing was arrested by police and was being questioned.
"The investigation is continuing and we hope the arrested man will talk and clarify more the matter, including whether the man with the explosives planned a bomb attack elsewhere," said the official.
There was no immediate claim of responsibility by militants for any attack in Casablanca.
North African governments fear violence may spill over from Algeria after the Salafist Group for Preaching and Combat renamed itself Al-Qaeda Organisation in the Islamic Maghreb with the aim of fusing similar groups together.
Last week, security sources said police had arrested Saad Houssaini, the head of the military wing of the Moroccan Islamic Combatant Group (MICG).
Police suspect him of being involved in the 2003 Casablanca bombings and the 2004 Madrid bombings, and security experts believe the MICG is one of the militant factions to have joined the larger al-Qaeda group.