UPDATE: A spokesperson for Angelina Jolie has issued the following statement: "This misleading leak is not in the best interests of the children. From the start, Angelina has been focused only on their health and needs, which is why it was so important that this last court hearing be conducted privately. It’s deplorable that someone, for their own selfish reasons, leaked selective portions of the confidential and sealed court record to create an inaccurate and unfair picture of what is really happening.”

With summer 2018 upon us, Angelina Jolie and Brad Pitt’s latest custody battle is finally seeing some closure.

As previously reported, Jolie is filming the Maleficent sequel in Europe over the summer and wants their six children (Maddox, 16, Pax, 14, Zahara, 13, Shiloh, 12, Knox, 9, and Vivienne, 9) to stay with her for the duration of the shoot.

Meanwhile, Pitt will be filming Quentin Tarantino’s Once Upon a Time In Hollywood (in, you guessed it: Hollywood—but also the U.K. for some reason), and wants his kids to be close to home.

At long last, an agreement has been reached for five of the couple’s children—the eldest Jolie-Pitt, Maddox, is being given the choice of how much time he’d like to spend with each of his parents.

According to court documents obtained by E!, the agreement is as follows: Pitt will have custody of his children from June 8 until June 17 for four hours per day while in London (Jolie has a rental home in the city). From June 27 to July 1, Pitt will be granted custody for 10 hours per day. The actor also has custody dates later in July.

The decision follows reports that a judge in Brad and Angelina’s divorce case ruled that "not having a relationship with their father is harmful" to the Jolie-Pitt children, and that it is "critical that each of them have a healthy and strong relationship with their father and mother."

'Maleficent' Costume And Props Private Reception - Red Carpet Arrivals
Credit: Fred Duval/Getty Images

An anonymous source told E! that both parties find the agreement “mutually acceptable,” specifying that Pitt “felt like he actually had a say and that the court was seeing his side of things" and is “thrilled” by the results.

“He feels this is a huge victory," the source continued. "It's a big step and he hopes to continue getting back on track with each of the kids."