The unnamed West Midlands Police officer is being treated in hospital for chest and stomach injuries after the attack at the mosque in the Ward End area of Birmingham last night.
Three others were injured and a 32-year-old man, who police say is a local man believed to be of Somalian descent, has been arrested on suspicion of attempted murder.
Unarmed officers were called to reports that a man armed with a knife had stabbed other worshippers in the mosque and arrived four minutes later.
As the attacker came at police with the knife inside the mosque, the officer fired a taser which hit the knifeman, but it had no effect.
Describing the chain of the events as he spoke at the scene of the attack today, Chief Superintendent Alex Murray said: “The individual stabbed the officer in the chest and in the stomach around the stab proof vest that he was wearing.
“The officer, although stabbed, and with a colleague managed to disarm the individual and make an arrest.”
He thanked officers and those who helped inside the mosque for their “heroic” actions.
“There was some real brave action going on inside that mosque last night,” Mr Murray said.
The injured officer is aged 31 and from the Yardley Wood area of Birmingham. He has served with West Midlands Police since 2007. His family is by his bedside as he is treated in hospital.
Mr Murray said the suspect, who was not a regular worshipper at the mosque in Washwood Heath Road, was arrested on suspicion of attempted murder and is currently being questioned by police.
The motivation for the attack is still not clear, he said.
“We don’t understand the motivation of this individual. We understand he was worshipping at the mosque but he wasn’t known to the mosque.
“The mosque welcomed him in that evening.
“There’s no connection with any other incidents that we can see at the moment - for example, Woolwich or other incidents around the country - but we’re exploring all lines of inquiry in relation to what motivated this individual to do such a thing.”
He added: “There’s no information at this stage to suggest it was a hate crime.”
Local residents said they heard screams coming from the mosque around 11pm, the approximate time the attack is thought to have happened, and saw people running out saying a man was inside stabbing people.
As well as the police officer, three other men were injured in the attack, two seriously.
A 28-year-old man was stabbed in the arm, and a 36-year-old man was stabbed once in the thigh. A third man suffered a hand injury and is now recovering at home.
“People inside the mosque were incredibly helpful,” Mr Murray said.
“First aid was administered both to the officer and to the other three individuals inside the mosque who were stabbed.
“There was an off-duty surgeon inside the mosque who also managed to give some first aid.”