Yishai Schlissel, the ultra-Orthodox Jew who stabbed six people at the annual Jerusalem gay pride parade on Thursday, had made a series of recent statements that could have indicated to law enforcement officials that he was planning some form of attack.

Jerusalem Mayor Nir Barkat said Thursday evening that “something went wrong” in police’s failure to track Schlissel and prevent him from carrying out the attack.

Schlissel was released from jail three weeks ago after serving 10 years of a 12-year sentence for attempted murder and aggravated assault following an almost identical attack at the capital’s pride march in 2005.

In recent weeks he allegedly circulated a handwritten, anti-gay manifesto, details of which were published in the Hebrew media on Thursday night. In the document Schlissel called the pride march “shameful” and “blasphemous,” and hinted at his intention to perpetrate another hate crime.

“Again the evil-doers want to march for abomination in the city of the King of Kings. They want to defile the temple and desecrate His holy name,” he wrote.

“It is incumbent upon every Jew to risk beatings or imprisonment and together to stop the desecration for the sanctity of His name. If we refrain from declaring war, they’ll feel free to spread this shame all over the world,” he said.

Following his release, Schlissel also told an ultra-Orthodox radio station, Kav HaNeues, that even a small-scale pride event in Jerusalem warranted a drastic response.

An injured woman after a stabbing at the annual Jerusalem Pride Parade on July 30, 2015. (Eric Cortellessa/Times of Israel)

An injured woman after a stabbing at the annual Jerusalem Pride Parade on July 30, 2015. (Eric Cortellessa/Times of Israel)

“If a single person comes and wants to hold the [gay pride] parade, it’s worthwhile doing something extreme,” he told the radio.

Referring to members of the LGBT community, Schlissel said that “these impure people want to defile Jerusalem,” adding, “the objective — I need to stop this parade.”

A witness who identified himself only as Dan told The Times of Israel that Schlissel first tried to approach Thursday’s parade as it made its way past Paris Square, but was turned away by police. He then circled back and ran at the crowd, screaming, near the corner of Washington and Keren Hayesod streets, further along the march route.

At approximately 6:45 p.m. Schlissel rushed at the pride marchers with a kitchen knife, stabbing one after another, before being wrestled to the ground.

“Jerusalem is not just the holy city, its also the capital of Israel. And as long as we are also a democratic state, this event is crucial. We’re here and we should be able to march in whatever city we live in,” eyewitness Yishai Avior told The Times of Israel.

“What happened is so obviously a hate crime, I just hope it will be treated like any other terror attack in Israel,” Avior added.