Joe Exotic isn't gonna sleep well tonight -- his nemesis, Carole Baskin, now has control of the Oklahoma zoo that used to be his, thanks to a judge's ruling.

The short story is Carole won a $1 million judgment against Joe and his mom many years ago, but she never got the dough. According to docs, obtained by TMZ, the judge said Joe's transfer of the zoo land to his mother and Jeff Lowe was fraudulent. So, now the judge is granting Carole control of the land to help satisfy that $1 mil judgment from the old trademark lawsuit.

The federal judge's ruling says Jeff has 120 days to get himself and all of the animals off the property. You'll recall, he had just re-opened last month and renamed the zoo, Tiger King Park.

Doesn't sound like Jeff is too busted up about the loss of land. He and his wife, Lauren, tell TMZ, "We have long anticipated that the judge would eventually undo the 2016 land transfer. We are thankful that he dragged out his decision this long and allowed us time to complete the new Tiger King Park in Thackerville Oklahoma, behind the World's largest casino."

If you hadn't heard, Jeff was already planning to ditch Joe's old Tiger King Park property in Wynnewood, OK.

Jeff and Lauren continued, "Considering [Carole] spent approximately 2.5M chasing her 1M judgment, we congratulate her on her new acquisition of 16 acres in rural Oklahoma."

They took one parting shot, saying, "The possibility of human remains being buried on this land should make her feel right at home."

Yeah, we think Joe would second that emotion.