Updated

Oksana Grigorieva signed a "Child Custody" agreement in May which spelled it out as clearly as can be -- Mel Gibson was not only entitled to unsupervised contact with Lucia, he was getting joint legal and physical custody of the child.

The document, obtained by TMZ, was signed by Oksana and Mel on May 16 ... but disavowed by Oksana shortly thereafter. She claimed she did not know the agreement gave Mel unsupervised contact with the baby.

But the agreement laid out in almost painful detail the schedule for custody, down to the day and the hour. Mel immediately got joint legal custody of the baby. He also got significant unsupervised visitation, which turned into 50/50 custody when Lucia turned three.

The agreement also provided, when Mel didn't have Lucia, the nanny would coordinate a Skype call between himself and the child.

The agreement spelled out who gets the kids on holidays. But these pages, which were initialed by both Mel and Oksana, were X'd out. We're told a similar schedule was later substituted for the one you see.

It was the Father's Day visitation that sent the case into family court, when Oksana refused to let Mel have the baby.

Oksana's lawyer, Dan Horowitz, had no comment.