REX / Shutterstock / Rex USA 1 / 7
REX / Shutterstock / Rex USA 1 / 7

Uma Thurman was granted primary custody of her 4-year-old daughter in a Manhattan court on Friday, ending a contentious battle with her ex.

"It's a wonderful thing to have closure," the actress said outside Manhattan Supreme Court, according to The New York Post's Page Six.

Uma's ex, Arpad "Arki" Busson, will get monthly visitation. The judge in this case, though, pleaded with the former couple to maintain civility for the sake of their daughter, Luna. Throughout the court battle, Arki accused her of abusing prescription pills and said she never returned a $1.5 million engagement ring; she accused him of of having an addiction to prostitutes.

The couple dated off and on from 2007 to 2014.

During the trial, a court-appointed psychologist said the duo "shouldn't be in the same room together."

Before the custody arrangement, Justice Matthew Cooper said he's heard enough of the verbal sparring.

"At this point, Luna has all the advantages in life. She has two parents who love her, two parents who amply provide for her," he said. "The only thing that's lacking — and I hope it's forthcoming — is that her parents can reach some sort of place in life where they can put aside their rancor and their anger against one another and can join together — never loving each other or even liking each other — at least being able to cooperate."

He continued, "If we can get to that point where the parents can work together collectively, then Luna will have everything any child could ever want in life."

Once outside the courtroom, Uma was asked if she and her French financier ex could have a nonvolatile relationship for Luna's sake, she said, "Hope springs eternal."

Arki was not in the courtroom on Friday, but his lawyer said, "We're delighted that this came to an amicable resolution."