A one-time top aide to former Prime Minister Ehud Olmert agreed Thursday to turn over a recording potentially incriminating her former boss in return for not having to serve more than 11 months in prison.

Shula Zaken, who is implicated along with Olmert in the massive Holyland graft case, reached the deal with the state prosecution after several days of failed negotiations for a bargain.

The recording is said to tie Olmert to the scandal, which involves a massive housing project allegedly pushed through with bribes to local officials, when Olmert was mayor in Jerusalem over a decade ago.

Olmert’s trial is expected to wrap up early next week and the new evidence would be used to file obstruction of justice charges against Olmert, prosecutors say.

Zaken’s new evidence was dismissed by Olmert’s lawyers as “lies” produced as part of a “witch-hunt” against him.

Negotiations for the recording nearly fell apart on Thursday when Zaken balked after failing to secure a guarantee that she would not be sent to prison.

However, by early afternoon the two sides agreed in principle to the 11-month sentence and were expected to later seal the deal.

On Wednesday, Zaken produced a recorded conversation between herself and Olmert, in which the ex-prime minister can be heard instructing Zaken to commit actions that could be considered by the court as an obstruction of justice, her associates were quoted by Hebrew media as saying.

In the recordings, Olmert was said to urge Zaken, his former bureau chief, not to sign a plea bargain with the prosecution, which earlier offered her a reduced sentence in exchange for testimony against her former boss. The evidence could be used to file new charges against Olmert and it is for that possible future trial that Zaken offered to be a state witness.

Zaken’s legal team was in talks with the prosecution several weeks ago to work out a plea bargain that would have seen her turn state’s witness in the case, in which Olmert (then mayor of Jerusalem) and others are accused of taking bribes to push through the Holyland project, a major residential development, a decade ago.

However, the prosecution said at the time that the testimony offered by Zaken wasn’t strong enough to justify a plea deal. The Justice Ministry said in a statement that the decision to decline her late testimony was made both because the trial had already passed the stage when new testimony could normally be admitted and because Zaken’s testimony could not be substantiated by “outside documentation.”

Former prime minister Ehud Olmert in Tel Aviv court as he prepares to give testimony at the Holyland trial, on Sunday September 29, 2013. (photo credit: Roni Schutzer/Flash90)

Former prime minister Ehud Olmert in Tel Aviv court as he prepares to give testimony at the Holyland trial, September 29, 2013. (photo credit: Roni Schutzer/Flash90)

Olmert is “corrupt,” the long-time aide was quoted as having told police during questioning three weeks ago. She had voluntarily offered the testimony, which contradicted sworn evidence she has given over the years in several cases.

Zaken said that Olmert had put money given to him by the American Jewish businessman Morris Talansky to private use — to buy suits, pens, cigars and overseas holidays — rather than use it as political campaign funds. She also said Olmert knew all the details of an alleged double billing scheme for his various trips abroad, under which more than one organization would sponsor the same trip, allowing the former prime minister to accrue funds which he used to finance family flights and upgrades to first class.

Olmert was acquitted of those allegations in 2012, and the state is currently appealing both verdicts.

The High Court of Justice rejected on Tuesday a petition by a nonprofit watchdog group to force the prosecution to allow Zaken to give last-minute testimony against Olmert. The Movement for Quality Government had appealed for Zaken to be accepted as a state’s witness against her former boss, but the High Court said the petition was lacking in factual justification.

Stuart Winer and Lazar Berman contributed to this report.