Paris(CNN)A teenage student killed a teacher at a school in southwestern France on Wednesday, authorities said.

The 50-year-old female teacher died from injuries inflicted by the attacker, a 16-year-old student, said French government spokesman Olivier Veran.

The assailant was a teenager suffering from psychological troubles who claimed to "be possessed" after stabbing the teacher in the chest, according to CNN affiliate BFMTV.

BFMTV reported that, following the attack in the town of Saint-Jean-de-Luz, the assailant fled into a neighboring room where he told a teacher that a voice had told him to commit the attack. The teacher took the weapon from the student and remained with him until police arrived, BFMTV said.

The incident occurred at the Saint-Thomas d'Aquin secondary school, in the Pyrenees-Atlantiques region of southwestern France, according to the local prefecture.

"The murder of a teacher in Saint-Jean-de-Luz fills us with intense emotion," French President Emanuel Macron tweeted. "I share the pain of her family, of her colleagues, of her students, of our teachers who dedicate their lives to transmitting knowledge to future generations. The nation is with you."

Veran also paid his condolences to those affected by the attack.

"I can hardly imagine the trauma that this can represent, locally and more generally on a national scale," Veran told journalists Wednesday, adding on Twitter that there are "no words to describe the tragedy."

French Education Minister Pap Ndiaye traveled to the school where the attack took place Wednesday and spoke to reporters there. Ndiaye said that 90 students from the suspect's class and two others from the same age group were being offered psychological support and that a minute's silence will be held in schools across France at 3 p.m. on Thursday for the murdered teacher.

"Nothing suggested the occurrence of such a terrible tragedy," Ndiaye said, adding that, "It's a sad day for the French education system, a sad day for this school."

Local prosecutor Jerome Bourrier said authorities have launched an investigation to determine whether the suspect committed "premeditated murder."

Bourrier said that the suspect --- who was not known to the police -- is in custody. A news conference will be held Thursday with French judicial authorities regarding the attack, the prosecutor added.