Lying can be very deadly.

A 13-year old student has confessed to lying about her teacher disparaging the Prophet Muhammad before he was killed last year, BBC News reported on Wednesday.

The French teen claimed that her history teacher Samuel Paty asked Muslim students to leave a classroom before he showed them caricatures of the Prophet Muhammad, a lie that led to the teacher's beheading by an Islamic terrorist 10 days later.

The student, whose identity was not disclosed and whose complaints triggered an online campaign against the instructor, admitted that she wasn't in the class.

She said that she had fabricated the story in order to please her father, according to The New York Post.

Backlash grew against the teacher since depictions of Muhammad are forbidden in Islam, and considered by Muslims as very insulting.

The girl's father was enraged by his daughter's account and amplified the accusations by posting two videos online. He identified Paty and the school in Conflans-Sainte-Honorine, west of Paris.

That caught the attention of Abdullakh Anzorov, "a radicalized Chechen migrant living in Normandy and scouring the internet for a cause," as The Guardian described him.

Ten days later, Paty was beheaded by 18-year old Anzorov, who was shot dead by police shortly after the attack.

"She lied because she felt trapped in a spiral because her classmates had asked her to be a spokesperson," her legal counsel, Mbeko Tabula, told Agence France-Presse.

It then emerged that the campaign against Paty had been based on a twisted account of what had actually happened in class days earlier.

As Paty had done in similar lessons on free speech in previous years, he warned students that he was about to show a depiction of Muhammad. He said anyone who thought they might be offended could close their eyes, BBC reported.

The teen had initially claimed her teacher had asked Muslim students to leave the room. When she objected she was suspended from school, she said, as per BBC.

It now appears that the girl was suspended a day before the class, Le Parisien newspaper said, because of repeated absence from school.