TMZ has learned ... Oksana Grigorieva signed an agreement with Mel Gibson for a $15 million package, which would have kept the Mel tapes secret, but she ultimately walked away from it.
Sources tell TMZ, during the child custody mediation in May, lawyers for Mel and Oksana worked out a financial deal for Oksana -- she would get a total of $15 mil, which included child support, a house and other assets.
But sources intimately familiar with the mediation tell us Oksana promised something in return -- that all "evidence" associated with the case remain confidential.
We've learned the "evidence" includes the tapes. Oksana's lawyers had played some, but not all of the tapes for Mel's lawyers. We're told Oksana's lawyers did not play the tape in which Gibson used the N word and made a reference to "wetbacks."
As one source put it, "The tapes loomed large in the mediation. The word 'tapes' was never used in the agreement, but it was central to the deal."
Oksana and Mel both signed a "short form agreement" -- a bare-bones contract outlining the broad strokes of the deal. The lawyers then drafted a long form agreement which contained specifics of the deal, but we're told Oksana refused to sign the long form, claiming she felt coerced.
We're told Mel never paid Oksana under the deal because the short form didn't spell out the specifics of payment and Oksana refused to sign the longer agreement which contained the details.