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.
As we reported ... Michael filed legal docs last month seeking custody of Kaitlyn, claiming he's taken a parental role in her life over the years despite not being her biological dad.
While there's no battle over 8-year-old Kylee -- she's living with her father -- June's vowed to continue fighting Michael for custody of Kaitlyn ... and so far she's winning.
Radar Online was first to report the news.