Israel's President Moshe Katsav has agreed a plea bargain to avoid rape charges and a prison term, the country's attorney general has said.
Mr Katsav has vigorously defended his reputation in the past
Mr Katsav had been facing allegations of rape and sexual harassment against women who worked for him.
He is now expected to get a suspended sentence for sexual harassment and be asked to pay damages to his accusers.
Mr Katsav's current term ends in July but he will now resign immediately, to be succeeded by Shimon Peres.
Mr Peres was elected earlier this month to be the next president, a largely ceremonial position.
Attorney General Menachem Mazuz told a news conference that Mr Katsav would plead guilty to, among other things, one count of indecent assault, describing it as a "serious criminal charge".
"Under the bargain, President Katsav admitted responsibility for a long series of sex offences, including harassment and indecent acts," he said.
Most of the allegations against Mr Katsav dated from years ago and were difficult to prove, Mr Mazuz said.
Rape convictions in Israel carry a maximum sentence of 16 years in prison.
Mr Katsav currently retains immunity from prosecution. This lapses after the end of his seven-year term in July.
Reports said he would submit his resignation to Dalia Itzik, speaker of the Knesset, Israel's parliament, later on Thursday.
His resignation would come into effect 48 hours later.