The Jerusalem District Court acquitted former prime minister Ehud Olmert of two major charges Tuesday morning, and convicted him of a lesser charge, ending a bitter and controversial legal battle that had prematurely ended his prime ministership in early 2009.

The former prime minister was cleared of charges of double billing on trips abroad in what was known as the Rishon Tours case, and of charges of illegally taking money from American businessman Morris Talansky.

Olmert was found guilty on a third lesser charge of breach of trust in a real estate investment case — the so-called Investments Center case — when he was industry minister. Sentencing was set for September.

Olmert still faces charges of taking bribes in a different matter, the Holyland real estate scandal. That trial is ongoing.

The result of the Holyland case, and the nature of the sentence handed down over the breach of trust conviction, will determine whether Olmert can return to political life. A politician is barred from returning to the Knesset for seven years if sentenced to three months or more in jail and if convicted of a crime that the courts determine constitute an instance of “moral turpitude.” Analysts Tuesday assessed that the breach of trust conviction would not likely prevent Olmert from returning to public life, meaning that his political future would hinge on the Holyland affair.

In this trial, the Rishon Tours and Talansky affairs were considered the main charges against Olmert. After the verdict Olmert thanked the court and his supporters, and reiterated his innocence. He praised the “honorable” handling of the case by the District Court judges, and quoted former prime minister Menachem Begin in saying, “There are judges in Jerusalem.”

He said it had been proven that there was no corruption in the Rishon Tours and Talansky cases and noted he was only convicted in the Investment Center affair on procedural charges.

In its verdict, the three-judge panel unanimously accepted Olmert’s defense that he thought his private trips were paid for by frequent flyer miles, and not via a Rishon Tours slush fund. The judges said there was no evidence that Olmert methodically took the leftover money from double billing groups for other trips abroad.

“The evidence did not prove beyond a reasonable doubt that [Rishon Tours] received money for Olmert,” Judge Musya Arad said of the Rishon Tours verdict.

Olmert’s assistant, Shula Zaken, however, was found guilty on charges of fraud and breach of trust in the double billing affair. She had maintained her silence under questioning over the affair.

The verdicts came at the end of a four-year trial on charges referring to incidents that occurred during the time that Olmert was mayor of Jerusalem and, later, a cabinet minister.

The prosecuting attorney said the verdict was unexpected. “Olmert broke basic norms of behavior time after time,” Eli Abarbanel told reporters. “We wouldn’t make light of the fact that such a public person was accused of these things.”

He added that the prosecution should not be blamed for investigating Olmert and said the indictment was not personal. “I am sure you will agree that we shouldn’t stop looking into a prime minister’s affairs,” he said.

Olmert’s lawyer Eli Zohar called the ruling a “great day for Israel,” and said he did not think an appeal would be fitting. “In a democratic state to appeal after an acquittal is not done,” he said. “I feel this matter is now at an end.”

Zaken spoke to reporters after the verdict, saying she chose not to testify in order to protect Olmert. “I felt that I would be used as a tool by those who wanted to bring down a prime minister,” she said.

Olmert’s supporters reacted to the ruling by saying the prosecutor had gone too far in trying to convict Olmert.

Amnon Dankner, a former newspaper editor and close friend of Olmert, said he was pleased with the result but that those who had hounded Olmert should consider their actions. The state prosecutor who brought the charges, Moshe Lador, “should be ashamed, and do some soul-searching,” Dankner said, then added, “The state prosecutor shouldn’t just resign, he should commit suicide.”

Dankner said Olmert had been the victim of “a legal putsch” since he had been forced out of office as prime minister to answer charges that had proved empty.

Moshe Negbi, Israel Radio’s legal analyst, said, however, that the state prosecution had acted properly. A former prime minister had been convicted of an act of corruption in the breach of trust case, he said — unprecedentedly for Israel. And while some “introspection” was required by the state prosecution, and “some mistakes may have been made,” Israel’s democracy would not benefit from an assault on the state prosecution authorities that would weaken them.

The accusations and eventual filing of charges led to Olmert’s resignation as prime minister in 2009. Under Israeli law, a minister cannot remain in office after being charged with a serious crime. Olmert’s political demise was expedited when, after Talansky gave early testimony against him, and before he had been indicted, then-Labor leader Ehud Barak demanded his resignation.

In the Talansky case, Olmert was suspected of bribery or campaign finance irregularities while serving as mayor of Jerusalem. Olmert denied that he received hundreds of thousands of dollars from Talansky, which were said to have been delivered in wads of notes stuffed into envelopes. The court found that Talansky did give Olmert money but was not persuaded that the transactions amounted to criminal actions.

Olmert said after the verdict that, “There were no envelopes of cash. No envelopes of cash,” he said. “Remove it from the order of the day.”

Olmert was also accused of billing several groups for the same trips abroad and putting the extra money in a slush fund at the Rishon Tours travel agency. The company’s CEO, Emanuel Baumwolspiner, was suspected of involvement in the case.

In both of those cases, the judges cleared Olmert, ruling that the allegations had not been proved beyond reasonable doubt.

The guilty charge came in the Investment Center affair, in which Olmert was accused of “a conflict of interest” with the clients of lawyer Uri Messer in a business issue that affected him and his function as industry, trade and labor minister.

The judges found Olmert had acted inappropriately in dealing with Messer, his former law partner.

“The accused made a decision that contradicted the opinions of professionals in the Industry, Trade and Labor Ministry,” the verdict read. “The accused loved Messer, and took care of him.”

Before the verdict, a smiling Olmert strolled into the small courtroom with a coterie of security. He left the courtroom at about 10:30 with a smile still on his face.

Olmert’s supporters have said in the past that the charges were a witch hunt to force him out of office at time when he claimed to be on the verge of making a deal with the Palestinians. The proposed agreement would have seen Israel give up almost all of the West Bank territory, divide Jerusalem into Israeli and Palestinian sovereign areas, and relinquish control over Jerusalem’s Old City to international administration. However, Palestinian Authority President Mahmoud Abbas has acknowledged that he did not accept Olmert’s 2008 offer, but rather came back with proposals of his own.

In addition to Tuesday’s verdict, the former prime minister is also still embroiled in another corruption scandal surrounding the controversial Holyland construction project in Jerusalem. Olmert is accused of accepting bribes while mayor of Jerusalem to help the project through planning committees, though it vastly outgrew its original dimensions.

In June 2012, the Jerusalem Magistrate’s Court sentenced Olmert’s bureau chief Shula Zaken to four months of community service for fraud and breach of trust in a Tax Authority bribery scandal.

The court ruled that during 2006-2007 she used her position as then finance minister Olmert’s bureau chief in order to promote the business interests of her brother, Yoram Karshi. Karshi was sentenced in 2011 to seven months in prison for breach of trust, bribery, and soliciting bribes.

Zaken has also been indicted in connection with the Holyland real estate scandal.

The Associated Press contributed to this report.