Weeks after his ex-wife was arrested for alleged child endangerment, Matt Barnes has been awarded sole physical and legal custody of their 10-year-old twin sons.
The retired NBA star, 38, was granted custody of his children, Carter and Isaiah, on Thursday following a court hearing in Los Angeles, according to TMZ, which also reported that Barnes obtained an 18-month restraining order protecting him against ex Gloria Govan. Under the order, Govan is not barred from seeing her sons.
The judge ordered Govan to complete 26 sessions of anger management and 10 parenting classes, according to TMZ.
Reps for Barnes and Govan did not immediately respond to PEOPLE’s request for comment.
The former Los Angeles Lakers star celebrated the custody news on Instagram, sharing a photo of himself with his legal team. “The DREAM TEAM!” Barnes wrote, adding, “Can’t thank you guys enough #GodIsGood.”
On Aug. 31, Govan, who previously starred on VH1’s Basketball Wives, was arrested and charged with felony child endangerment after she and Barnes were involved in an altercation at their sons’ school, according to multiple reports.
Govan and Barnes had a messy divorce after splitting in 2014 following nearly two years of marriage. They settled their divorce in December 2016, TMZ reported.
However, before her divorce was finalized, Govan began dating Barnes’ ex-teammate Derek Fisher, who was also still legally married at the time in 2015. Govan’s relationship became a point of contention that reportedly drove a wedge between Fisher and Barnes’ friendship.
Fisher proposed to Govan in April.
Barnes offered his congratulations in a since-deleted Instagram post, USA Today reported, writing: “I have two beautiful boys from my ex. We are both focusing on co-parenting, and providing the best atmosphere and childhood for them. They love [Fisher], so I love it. Despite not seeing eye to eye initially with Derek, he and I are on the same page and communicate weekly about [my sons]. With that being said, congrats on the engagement!”