A 15-year-old British girl accused of attempted murder was “motivated” by Batman’s archnemesis, The Joker, a witness testified in court Wednesday.

The alleged teen terror showed up at school on April 25 with both sides of her mouth cut — mirroring the self-inflicted scars of The Joker, as portrayed by actor Heath Ledger in “The Dark Knight,” the witness told a Winchester Crown Court via video link.

The girl then lured a former school chum to a vacant area of the Hampshire school, “giggling” as they walked, and then attacked her with a sharp object, the court heard.

Luckily, the victim only suffered a minor puncture wound to her chest.

The defendant — who denies the attempted murder charge — had previously spoken about cutting up her face like Ledger’s character.

“She had referred to cutting her face like The Joker scars, one cut either side of her mouth, from Batman,” the witness said.

‘She had referred to cutting her face like The Joker scars, one cut either side of her mouth, from Batman.’ - witness

The girl added in a message sent to the witness that she was influenced by Ledger’s portrayal, saying, “If they blamed it on The Joker or Columbine, they didn’t inspire me, they motivated me,” according to the BBC.

She then allegedly sent a follow-up message, saying, “If the plan does fail I will say the voices in my head made me do it.”

Earlier in the day, the girl told the witness that she was going to commit the dastardly act, but her pal didn’t believe her, the BBC said.

Prosecutors told the court that the girl was a fan of serial killers and obsessed with school shootings, according to the BBC.

The names of the defendant, victim and witness were not released due to their ages. The trial was adjourned until Thursday.