The former mayor of Bat Yam reached a plea agreement with the state attorney on Thursday in which he will plead guilty to three charges of breach of trust in order to avoid being tried for accepting bribes and corruption.

Shlomo Lahiani, 48, was indicted last October following years of investigations and just three weeks before he successfully defended his mayoral seat in the seaside town south of Tel Aviv. In February a special Interior Ministry committee removed Lahiani from his position due to the charges against him.

“I accept responsibility upon myself — and thus free anyone else involved from responsibility and also free my family from five years of suffering,” Lahiani said in a statement after the deal was announced. “I want to put this all behind me and move forward.”

The court accepted the plea deal.

Arguments for sentencing are to be heard next month. A key element is whether or not the court will include moral turpitude in Lahiani’s crimes. If so, he will be forced to wait a period of seven years before returning to public service, causing him to miss the next Bay Yam elections that are due in 2018.

The state attorney intends to demand at least a year behind bars. Lahiani’s defense counsel hopes to negotiate a lesser sentence of community service.

The former mayor was accused of failing to declare and pay taxes on NIS 8 million (around $2,200,000) in income and of accepting bribes of some NIS 900,000 (around $250,000).

Lahiani was also accused of running a ring of city employees who used their status to take out bank loans worth NIS 440,000 ($128,000) that they passed on to Lahiani personally, and of a conflict of interest in an affair where the city would take out advertisements in a local paper of which he was a part owner.

Times of Israel staff contributed to this report.