Israel’s president Reuven Rivlin has revoked an invitation to a popular Israeli singer to perform at a high-profile public event after the pop star released an inflammatory new song about an east Jerusalem Palestinian who imagines stabbing Jews.

The song “Ahmed Loves Israel” was released at the weekend in the midst of concern over a wave of racist incidents that have targeted Palestinians. Those in turn have been fuelled by recent violence, including a spate of deadly attacks targeting Jews including an assault on a Jerusalem synagogue last week that left four rabbis and a Druze policeman dead.

The song, written and performed by Amir Benayoun, includes the words: “Salam aleikum, my name is Ahmed, I live in Jerusalem. I study at the university. Who better than me enjoys both worlds. Today I’m moderate and all smiles like a cherub.

“Send a Jew to hell. It’s true I’m scum, an ingrate, but I’m not to blame, I wasn’t raised on love. When you turn your back on me, I’ll shoot you in the back or stick an axe in you.”

The performance at the president’s house was cancelled after the song was initially posted on Facebook. The track – viewed over 100,000 times over the weekend – sparked a furious debate, with some commenters accusing the singer of racist incitement.

In an interview on Army Radio, Benayoun at first refused to apologise for his lyrics, raging at the host: “Enough with this hypocrisy; I get my inspiration from the latest [synagogue] murders. You’re murderers yourselves, your words lead to murder - you should be ashamed of yourselves!”

However he later posted a more conciliatory message on Facebook, saying: “The song published yesterday was only meant to express his emotions, not to call for violence against anyone. We’re absolutely against any violence.”

Following its release, the office of Rivlin, who since becoming president has publicly warned against the growing threat of racism in Israeli society, said it was cancelling its invitation to Benayoun to perform at next week’s event marking the expulsion of Jews from Middle Eastern countries.

A statement said the sentiments expressed by Benayoun in the song “Ahmed Loves Israel” are “inconsistent with the responsibility required of the president’s residence.”

Explaining the decision, Harel Tubi, chief-of-staff of the president’s official residence, said: “We do not intervene, we are not the censor for artists and don’t meddle in artistic content. But in this case, the debate is not over the song itself but about the role of the president’s residence and the platform it extends to various voices in Israeli society. We could not remain indifferent and so we decided that we could not approve Benayoun’s performance.

He added: “We have a public obligation to be attentive and to take part in the common effort to calm tempers and restore quiet to the streets. This would be an inappropriate time for the president’s residence to serve as a platform for an artist who sings this, as talented as he may be. His words were written in passion and in great pain. We feel the same feelings but we cannot absolve ourselves of the responsibility we have.”

Since the deadly synagogue attack last week there has been growing concern about racism, with the mayor of Israeli town Ashdod attempting to ban Israeli Arabs and Palestinians with work permits from working on construction sites near its schools and some shops, posting signs saying they do “not employ Arabs”.