A 14-year-old who stabbed his art teacher told French police he attacked her because he had "too much hatred", a prosecutor has said.

The 60-year-old woman's condition remains a "serious concern" after she was stabbed three to four times in her chest in front of 22 students in south-eastern France on Tuesday, a local official said.

Toulon prosecutor Raphaël Balland said in a statement that the boy had premeditated the attack, having described to police taking the knife from his kitchen at home with the "intention of stabbing his teacher".

La Guicharde school, in Sanary-sur-Mer, was evacuated after the attack on Tuesday, and lessons the next day were cancelled.

Balland said there was no known religious or political motivation for the stabbing and that the student was allegedly upset that the teacher had reported several disciplinary incidents against him, which the boy said were "unfair".