The Army announced Friday that Maj. Gen. Joseph Harrington will be stripped of a star and forced to retire as a result of a four-month social media relationship with the wife of an enlisted soldier, USA TODAY reported.

Harrington and the woman exchanged more than 1,000 Facebook messages, characterized by USA TODAY as ranging from friendly to flirty. Harrington had jurisdiction over the woman’s husband under military law.

A letter of reprimand to Harrington noted that while not guilty of a crime, he was expected to behave honorably both on and off duty.

In a statement, Harrington wrote that he “made a mistake by responding to and entering into a private discussion with a soldier’s spouse.

“While we both considered it a friendship-based conversation, it is clear that the discussion should not have occurred. I hope others can learn from and avoid my mistake.”