An IDF officer who was caught on film striking a Danish peace activist in the face with his rifle was sentenced to perform two months of community service without pay, and was ordered to resign his commission at the IDF’s minimum retirement age, Israel’s central military court ruled Thursday.

Lt. Col. Shalom Eisner is expected to carry out his sentence at the IDF’s Ground Forces headquarters beginning February.

Eisner, a deputy commander of the Jordan Valley Brigade, was accused of slamming the magazine of his rifle into the face of 20-year-old Andreas Ayas in April.

The incident occurred when, according to the army’s account, a group of activists attempted to break through a military blockade outside of the West Bank city of Jericho. Soldiers who witnessed the events alleged that the activists had initiated the violence, hitting soldiers with sticks and even throwing a bicycle that struck Eisner.

Eisner claimed that one of the activists had hit him with a stick, breaking two of his fingers, and that he was struck from behind.

During the investigation that took place immediately following the incident, he acknowledged that his actions were wrong, but he also blasted the upper echelons of the IDF for being more concerned with the army looking good on camera than in ensuring that the IDF achieve its objectives.

He also rejected the claims of “moral failure” for his actions, saying that his response had resulted in the dispersion of the demonstrators.

The military court’s ruling was issued after the IDF’s prosecutors accepted a plea bargain suggested by Eisner’s attorneys several months ago. During the court session, Eisner admitted to behavior unbecoming an officer.

Asher Zeiger contributed to this report.