The teacher was stabbed in the side and throat while preparing for his class at a school in Aubervilliers, northeast of Paris, but his life was not in danger, the police source said.
France names first attacker, vows to destroy Islamic State
The attacker was dressed in painter's overalls and a balaclava and arrived without a weapon but grabbed what appeared to be a box cutter that was lying in the classroom.
According to local prosecutors the man shouted: "This is Da'ish. This is a warning." Da'ish is another name for IS.
The brief exchange was reported by a witness working inside the school.
The attacker fled after stabbing the teacher and the probe has been taken over by anti-terrorist investigators.
Islamic State claims responsibility for Paris attacks
The Islamic State's French-language magazine Dar-al-Islam called in its November edition for its followers to kill teachers in the French education system, describing them as "enemies of Allah" for teaching secularism and "in open war against the Muslim family."
The attack comes as Paris is on high alert after a wave of shootings and suicide bombings at Paris nightspots on November 13 that killed 130 people and left 350 injured. Security has also been boosted at schools.
COMMENTS
Comments are moderated and generally will be posted if they are on-topic and not abusive.
For more information, please see our Comments FAQ