Israeli history teacher Meir Baruchin has paid a high price for denouncing the war in Gaza: he was sacked from his job and even locked up as a "high-risk detainee".

The school teacher triggered a firestorm after Hamas's attack on Israel on October 7, by posting a photo of Palestinians killed by the Israeli army.

He has now been given permission to teach students again at the Yitzhak Shamir High School in Petah Tikva near Tel Aviv.

But the approval is only provisional and he has to do so remotely so as not to cause incidents.

Baruchin, 62, remains critical that even talking about the fate of Palestinians in Gaza can prompt legal action.

Israel was traumatised by Hamas's unprecedented attack, which resulted in the deaths of more than 1,160 dead, most of them civilians, according to an AFP tally based on Israeli official figures.

Palestinian militants also took some 250 hostages, 132 of whom remain in their hands.

In response, Israel vowed to destroy Hamas and launched a devastating offensive that has left more than 27,500 people dead in Gaza, most of them women, children and adolescents, according to the Hamas-run territory's health ministry.

"If you go out in the street you hear two basic arguments," Baruchin told AFP.

"Some people say: We don't care about killing innocent civilians in Gaza after what Hamas did to us on October 7, they deserve it.

"Other people say: It's too bad that we kill innocent civilians, including women and children, but it's Hamas's fault. Israel is not responsible.

"For me, it's unacceptable. We do have responsibility. I'm an Israeli citizen, I cannot say that I'm not responsible... My own government is turning me into a murderer."

- Qualified support -

Baruchin, who is a member of the group "Looking the Occupation in the Eye", which highlights conditions in the occupied Palestinian territories, said he was "horrified" by the October 7 attack.

"I won't be sorry if the Hamas movement disappears, and if Hamas's leader Yahya Sinwar meets the devil, you won't see me crying," he added.

But Baruchin argued the military operation in Gaza would not make Israel more secure. Instead, it was "creating hatred that will go on for generations".

The authorities in Petah Tikva, led by a member of Prime Minister Benjamin Netanyahu's right-wing Likud party, accused him of "sedition" and "incitement to terrorism" after his Facebook post of a Palestinian family who had been killed.

He was arrested on October 19 and his school sacked him the next day.

On November 9, he was imprisoned in solitary confinement for "intent to commit an act of treason" and "intent to disrupt public order".

On November 14, the charges were dropped and he was given provisional permission to resume his job, pending an industrial tribunal decision at the end of March.

But when he returned to school on November 19, his students refused to go into class. "For them, I'm a Hamas supporter," he recalled.

Baruchin, whose 19-year-old twins were drafted into the army in December, said had received only qualified support from colleagues.

"They told me: Meir, I'm fully behind you but I have children to support, I'm with you but I'm paying a mortgage, I'm with you but my daughter is getting married, I'm with you but we just started to redecorate the house," he said.

"They are afraid to speak up."

- Political message -

The left-wing daily Haaretz said in an editorial that Baruchin was "used as a political tool to send a political message".

"The motive for his arrest was deterrence -- silencing any criticism or any hint of protest against Israeli policy," it said.

Elsewhere, Yael Noy said she would keep acting according to her convictions, but discreetly.

She runs "Road to Recovery", an Israeli non-profit that takes mainly sick Palestinian children from the occupied West Bank and, before the war, Gaza to Israeli hospitals for treatment.

Even within her own entourage she has been accused of "being a friend with the enemy", prompting the NGO's volunteers to slump from 1,300 to barely 400.

These days "I pay more attention when I speak because I think it can be dangerous," she said.