Sources connected with the case tell us the trigger for the hearing was TMZ's story the day before ... in which we reported Oksana claimed in her deposition earlier in the week that Mel beat her in order to get aroused during sex.
We're told Mel and his lawyers were outraged and accused Oksana's team of leaking the info. Mel's family lawyer, Stephen Kolodny, asked Judge Scott Gordon on Friday to take custody away from Oksana on grounds she acted maliciously -- not in the best interests of Lucia -- by allegedly leaking the story.
According to our sources, Kolodny also argued many of the allegations Oksana made during her deposition -- including the one reported on TMZ -- have never been made before and is a belated attempt to smear Mel and harm Lucia.
Our sources say Kolodny asked Judge Gordon for an immediate ruling but the judge refused, setting the matter for a full hearing next month.