Katt Williams has won back custody of his 8-year-old daughter after losing her last month when a former nanny allegedly lied to a judge to take her away from him. More details after the jump!

Wendy L.

(TMZ)–Last month a woman named Crystal McGhee went to L.A. court, seeking sole custody of Katt’s daughter claiming she was the child’s mother.

Katt failed to show up to fight McGhee’s claim so the judge granted her request by default on the assumption McGhee was legitimate.

However, Katt just filed new legal docs in L.A. County Superior Court claiming McGhee’s nothing but a shameless, former nanny “with no parental rights,” who hasn’t worked with the family for years. The judge has since overturned the previous order.

It’s unclear what motivated McGhee to seek custody, but Katt’s legal docs suggest it has to do with California State parenting perks: collecting government benefits.

Calls to McGhee were not returned.