Seven IDF soldiers were sentenced to short terms in prison Thursday for posting photographs calling for retaliation for the killing of three Israeli teenagers — statements that, according to the army, constitute a breach of military discipline.

In one of the pictures, three the cadets of the ultra-Orthodox Netzah Yehuda battalion pose behind a sign bearing the words: “Bibi [Netanyahu], let us assassinate the terrorists.” The soldiers’ faces are obscured, but the paper is signed with the name of their battalion. They were sentenced to 10 days’ imprisonment.

The photo was one of hundreds posted by Israelis — including dozens of Israel Defense Forces soldiers — in Facebook groups that called for revenge in response to the slaying of the Israeli students, prompting fierce condemnation from the IDF and assurances that those responsible would be dealt with severely.

Get The Times of Israel's Daily Edition by email and never miss our top stories Free Sign Up

Amid accusations that racist comments on social media sites could have instigated the alleged revenge killing of an Arab teenager, Muhammed Abu Khdeir, 16, in East Jerusalem on Wednesday, Israel police announced it would investigate cases of “incitement” on social media.

The IDF explained that the four soldiers “were sentenced to several days in prison for operating against the army’s orders.

“Every case that the commanders are notified of will be dealt with severely, as was the case in question,” it added.

However, Adi Kedar, the soldiers’ attorney, maintained that the four had not done anything wrong.

“The military is trying to deal with the Internet protest with the wrong case, and has decided to hold the wrong people accountable,” he said. “The things the fighters uploaded are not a crime. These are good soldiers, model soldiers.”

Kedar called on the IDF to reverse the decision.

After the bodies of Eyal Yifrach, Gil-ad Shaar and Naftali Fraenkel were found Monday, thousands of Israelis, including many soldiers in uniform, took to social media sites to post dozens of photos and messages pledging revenge for the three teenagers’ killing, often using racist language.

A Facebook page titled “The People of Israel Demand Vengeance!” had over 32,000 “Likes” on Wednesday, but was taken down by Thursday morning. Other smaller pages, bearing the same campaign name, could still be found on the social network.

President Shimon Peres called on Israelis Thursday to “to respect the law and to avoid incitement.

“People who are engaged in incitement are not always aware where it can lead, to more sorrow, to more dangers. It’s time for all of us to show restraint, to show understanding and let us, as human beings, all of us, be true to our morality, to our hope to live together in peace,” he said in a statement.

The IDF spokesman said Thursday morning that the social media statements were being viewed with “the utmost severity.”

“We regret that the national feeling of sadness is being exploited by politicized elements to incite and to draw IDF soldiers into this kind of activity,” a statement from IDF Spokesman Brig. Gen. Motti Almoz read. “Freedom of speech on social networks is no substitute for command conversations in instances of this sort.”

Commanders have been instructed to “take a hard line” against soldiers making racist remarks or calls for vengeance, and to act to prevent such statements and acts, the statement added.

Raphael Ahren contributed to this report.