Well-trained militants armed with machine guns, rocket launchers, and gasoline bombs battled from the basement, Arshad said, adding that rebels had also been firing from minarets and had booby-trapped some areas.
"Those who surrender will be arrested, but the others will be treated as combatants and killed," he said.
The assault began minutes after a delegation led by a former prime minister left the area and said that efforts to negotiate a peaceful end to a week-old siege had failed.
Clashes this month between security forces and supporters of the mosque's hard-line clerics prompted the siege. The religious extremists had been trying to impose Taliban-style morality in the capital through a six-month campaign of kidnappings and threats. Before today's assault, at least 24 people had been killed in and around the mosque.
The assault was signaled by blasts and gunfire. About three and a half hours after the assault started, Arshad said 50 to 60 percent of the complex had been cleared but resistance continued in various places.
At least 40 militants had been killed and between 15 to 20 had been wounded. Arshad said three special forces commandos were also killed and 15 wounded.
Rebel leader Abdul Rashid Ghazi told the private Geo TV network that his mother had been wounded by gunshot. There was no immediate official confirmation of his claim.
"The government is using full force. This is naked aggression," he said. "My martyrdom is certain now."
He said that about 30 militants were resisting security forces but were only armed with 14 AK-47 assault rifles.
As the fighting ensued, emergency workers at an army cordon waited for access to the compound.
READER COMMENTS »
View reader comments » Comment on this story »