Israeli Prime Minister Benjamin Netanyahu's bureau chief resigned amid a harassment scandal.
Natan Eshel resigned from his position on Sunday and agreed never to work in the civil service again under the terms of a plea agreement.
Eshel admitted to "unprofessional behavior" with a female subordinate amid a probe launched after a third-party complaint was filed.
Eshel said the plea bargain "lifts the cloud of indecent acts and/or pictures and sexual harassment off from my life once and for all, and puts an end to the dance of demons around me."
Sixteen co-workers testified to the Civil Service Commission that Eshel had an inappropriate relationship with R. He was accused of stalking R, reading her e-mails, and taking inappropriate photos of her.
R did not file the complaint and has refused to cooperate with investigators, press charges or testify against Eshel.
While it has been widely speculated in the media that Eshel's harrassment of R had sexual overtones, the salient facts of the confidential investigation remain unknown to the public.
A source in the Prime Minister's Office who spoke on condition of anonymity said, politically speaking, Eshel had little choice but to resign once an investigation was launched, irrespective of his guilt or innocence.
Netanyahu needs his office running smoothly so he can tackle the big issues - and the controversy surrounding Eshel's alleged behavior had to be brought to a quick end.
Bureau director Gil Sheffer will replace Eshel, who was formerly editor-in-chief of the now defunct Hatzofe daily Hebrew newspaper.