A senior military official at the center of the so-called Harpaz affair was forced out of the army Sunday, the first casualty of an investigation into infighting between the defense minister and the former Israel Defense Forces chief of staff.

Col. Erez Weiner, who served as the aide-de-camp to ex-IDF chief Gabi Ashkenazi, informed current army head Lt.-Gen. Benny Gantz Sunday that he would not fight to stay in the army, but would leave his post “with a heavy heart.”

Weiner took the brunt of the criticism from the state comptroller’s report, released Sunday, into misdeeds among the army’s brass from 2009 to 2011, which found him having a hand in the drafting of a forged letter reportedly meant to smear a candidate to replace Ashkenazi.

The report, which detailed a bitter interoffice battle between Ashkenazi and Defense Minister Ehud Barak, also said Weiner offered to carry out covert activities against the defense minister for his boss.

On Wednesday, Gantz told Weiner he took the report seriously and that he would have to leave.

“There’s no place for your promotion or sticking around in the army in light of the report,” Gantz said, according to Ynet.

Weiner was set to head the army’s education corps before being frozen out of the promotion by the defense minister when the Harpaz scandal broke.

Weiner has vowed to fight the claims in the report, which could lead to a criminal investigation, but said he would not wage a battle within the army, which could entangle other high-ranking officers.

“I have no intention of harming the army; I will expose these things via other means,” Weiner was quoted in Ynet saying. “I do this with a heavy heart.

In a letter to Gantz, Weiner wrote that he “found it [his being asked to leave the army] strange, especially in light of the fact that you too were around for that whole period, while you were Ashkenazi’s deputy, and personally experienced the same issues.”

The investigation into the affair was sparked by a document meant to sway the appointment of Ashkenazi’s successor as chief of the General Staff. First revealed on Channel 2 News on August 6, 2010, and portrayed as an attempt to smear Ashkenazi, the police found within days that the author of the document was a former rear-echelon officer in the army’s special ops directorate, Lt. Col. (ret) Boaz Harpaz — “a family friend,” by his own admission, of Gabi Ashkenazi and his wife, Ronit.

Harpaz told the state comptroller that he contacted Ashkenazi but then revised his statement and said that on October 22, 2009, the chief of the General Staff got in touch with him. Ashkenazi claimed it was the other way round. Regardless, both conceded that Ashkenazi had put Harpaz in contact with Weiner.

Weiner responded to the report by saying there was “a significant gap between the thickness of the [294-page] report and its merit.”

He said he carried out the demands of his role as Ashkenazi’s aide despite “significant harassment directed against [Ashkenazi] by the defense minister’s office in a systematic manner over time.”

The report also found fault with Ashkenazi and, to a lesser degree, Barak and Prime Minister Benjamin Netanyahu, who was chided for not stepping in to calm tensions at defense headquarters.

Ashkenazi himself expressed disappointment with Gantz’s decision to dismiss Weiner. “He is an ethical officer who contributed much to Israel’s safety. In his role as aide to the chief of staff he found himself in an impossible situation as a result of the actions of the defense minister and his staff who harmed the army,” said Ashkenazi.

Ilan Ben Zion and Mitch Ginsburg contributed to this report.