Andy Ruiz's ex has won her court battle with the star boxer ... TMZ Sports has learned a judge granted her a permanent restraining order earlier this month against the former heavyweight champ.
Julia Lemus had been seeking the order of protection since April 2023 ... after she alleged Ruiz sexually assaulted, abused, and terrorized her throughout their relationship.
In her application for the order, Lemus -- who began seeing Ruiz around 2016 -- said the 34-year-old would often grab and yank her to move her wherever he wanted her to go. She also claimed he would "jokingly" punch her in her arms and legs, leaving her with bruises.
Lemus also said Ruiz pointed an AK-47 at her face during a 2023 incident ... after she said she told him she felt uncomfortable with a recent firearm purchase he had made.
In addition, Lemus said Ruiz began sexually assaulting her that same year, forcing himself onto her on at least six occasions.
She was granted a temporary restraining order after making the allegations, but when Ruiz adamantly denied the claims -- and later hired famed attorney Camille Vasquez to represent him -- the two went to court to determine if a permanent one should be put in place.
Both parties testified in front of a judge -- as did multiple witnesses. And, ultimately, the judge ruled in favor of Lemus on April 8 -- granting her a 3-year restraining order that she will have the ability to renew upon request.
In making her ruling, Judge Sharon L. Kalemkiarian wrote in court documents she determined the evidence showed Lemus "is in fear as a result of aggressive, demeaning and controlling behavior by Mr. Ruiz."
"Mr. Ruiz did assault her," Kalemkiarian added, "did disturb her peace, and did exercise coercive control throughout the entire relationship."
As part of her order, Kalemkiarian ruled Ruiz must stay 100 yards away from Lemus, her home, her job, and her vehicle. She also ordered Ruiz to have no guns ... and to take a 12-week anger management program.
The judge gave sole custody of the couple's two children to Lemus, too -- noting he could have supervised visits with the children.
The order is slated to remain in place until April 8, 2027.