A Palestinian teenager was charged with terrorism and four counts of attempted murder on Monday for carrying out a stabbing attack in Tel Aviv last month.

According to the indictment filed in the Tel Aviv Magistrate’s Court, Imag Agbar, 18, from Nablus, confessed to going on a stabbing spree with wire-cutters in the lobby of the Leonardo Beach hotel on April 23.

Four people, including a man in his 70s and a woman in her 50s, were hospitalized with light injuries as a result of the attack.

The indictment says that Agbar told investigators that he decided “to kill Jews because they are Jews, with the intent of either dying or being arrested…[in order] to turn into a martyr or hero.”

Defense officials said that Agbar entered Israel from the West Bank on a one-day permit with a group known as “Natural Peace Tours,” which is supposed to forge relationships between Palestinians and Israelis.

In December, he crossed the Green Line into Israel with the intention of carrying out an attack at the Dead Sea. However, when his taxi driver told him that few tourists were expected that day, he decided to turn back.

The indictment says that in March, Agbar determined that Tel Aviv would be a more suitable location to target Israelis. He subsequently began planning the attack by reaching out to Natural Peace Tours and studying the waterfront location using Google Maps.

He learned to sharpen his belt buckle, transforming it into a makeshift knife that could still pass through Israeli security checks.

When he arrived in Israel once again on April 23, he abandoned the group at the first opportunity in order to carry out the attack. After stabbing the four victims, he was apprehended by police as he ran out of the Leonardo.

Hundreds of Palestinians were later denied Israeli entry permits to attend a joint Israeli-Palestinian memorial service last week because of the attack.

Judah Ari Gross and Tamar Pileggi contributed to this report.