Robin Thicke and Paula Patton have reached a custody agreement.

The pair - who were married from 2005 until their divorce a decade later in 2015 - had been locked in a bitter custody battle over their seven-year-old son Julian since Paula first filed for divorce three years ago, and on Friday (18.08.17) they finally reached an agreement.

The 'Blurred Lines' hitmaker will have custody of his son Monday through to Wednesday, whilst Paula has him Wednesday through to Friday, with the former couple alternative who takes care of their son over the weekends.

According to TMZ.com, Robin, 40, and Paula, 41, also agreed to share the cost of expenses, including Julian's private school tuition.

The publication also reported that legal documents filed on Friday indicate a vacation and holiday schedule was also arranged.

For Robin, the good news comes just days after it was revealed he is set to become a father for a second time when his girlfriend April Love Geary announced the pair would be expecting their first child together.

The 22-year-old model shared their happy news on Instagram, and revealed their unborn baby is due to be born on what would have been the birthday of 40-year-old Robin's late father, Alan Thicke.

She shared a picture of her ultrasound scan and wrote: "Robin and I are very excited to share with you all that we're having a baby! The due date is March 1st, Alan's birthday! (sic)"

Sources told TMZ that Robin and April - who have been together for three years - are having a baby girl and when they broke the news to Julian earlier this week, he is "super excited for a little sister."

Previously, Robin has spoken of how he and Julian have a very strong bond.

He said: "We do everything (together). We go to theme parks or museums or ball games or just go to the park on Saturday and sit around and walk for a few hours. Kick a ball and all that stuff that dads and kids do."