Mama June scored a legal victory in her custody battle over Anna "Chickadee" Cardwell's oldest daughter ... she's been awarded temporary custody of Kaitlyn.
The reality TV star is duking it out in court with Michael Cardwell for custody of 11-year-old Kaitlyn, and a judge just ruled she should be with her grandmother, at least until a future court hearing on the matter ... according to new legal docs.
Michael -- who did have a daughter, Kylee, with Anna -- is not Kaitlyn's biological father.
In the docs, obtained by TMZ, Mama June says Kaitlyn does not have a legal father, and her biological father is unknown.
Mama says she's been caring for Kaitlyn since Anna's death, and says Kaitlyn moved in with her a month before Anna died from cancer.