After a contentious custody battle, retired NBA player Matt Barnes won sole custody of his 10-year-old twins that he shares with his estranged wife, reality TV star Gloria Govan.

Michelle Obama had miscarriage 20 years ago and used IVF to conceive daughters Malia and Sasha

On Thursday Barnes, 38 attended a court hearing in Los Angeles where a judge granted him sole physical and legal custody of his children, Carter and Isaiah, TMZ reports. Barnes received a restraining order against Govan for the next 18 months after a violent confrontation a few months back. However, Govan is still allowed to see her sons.

The “Basketball Wives” star allegedly used her SUV as a “deadly weapon,” therefore endangering the kids when Barnes tried to pull them out, the NY Daily News reports. Barnes claimed that Govan put the car in reverse and hit the gas, which caused one of her sons, who was exiting the vehicle, to hit his head.

Govan has to attend 26 sessions of anger management and 10 parenting classes, as so ordered by the judge, TMZ reports.

Facing Real Consequences

Earlier this year, Govan was  arrested for child endangerment after getting in a fight with Barnes over custody of their twin sons.

According to TMZ, Barnes was set to pick up their children — 9-year-old twins Carter and Isaiah — from school, per their custody agreement. However, when Govan arrived early and put the kids in her car, all hell broke loose.

Michelle Obama slams Trump in new memoir and says she’ll “never forgive” the “xenophobic” and birther comments that put her family in harm’s way

In September Govan wrote on Instagram:

“Let me tell y’all something… there isn’t a person on this earth that isn’t struggling with something! I don’t care how much money, success, or followers anyone has. We all have problems. You’re not alone. Trust me,” she captioned the photo. “Don’t let peoples filtered pictures fool you. God has equipped you, HE has prepared you for everyday. Each day is ordered by him. You’re going to be ok!!! You will get through this. Trust in your purpose and don’t be afraid to ask for help. A prayer for all of us. #Faith #prayer #power.”