Will Smith opens up about difficult relationship with son Trey

Will Smith has a reputation as a family man, but his blended brood wasn't always close-knit.

The two-time Oscar nominee revealed in a heartfelt Instagram video on Tuesday that he and his oldest son Trey "struggled for years" after the "Men in Black" star divorced Trey's mother, Sheree Zampino, in 1995.

"So I'm in Abu Dhabi at the F1. I brought my son Trey. We been hanging and usually I take my kids separately on stuff just so they have their individual daddy time," a teary Smith, 50, said in the video. "So we've been doing this, me and him hanging out at the F1. And he just hit me with, 'You know what dad? I just realized you're not just my dad.' He paused and he said, 'I'm pretty sure you’re my best friend.'"

Smith sniffled and quipped, "I was like, ‘Whoo. Yeah, man. Probably. Probably."

The "Aladdin" actor admitted in his caption, "We STRUGGLED FOR YEARS after my Divorce from his Mother. He felt betrayed & abandoned. It is a Wild Blessing to recover & restore a Loving Relationship with My Beautiful Son! @treysmith0011."

Smith began dating his current wife, Jada Pinkett Smith, while he and Zampino were separated, but not divorced, which Pinkett Smith later admitted she regretted.

Pinkett Smith, 46, and Will tied the knot in 1997, and the "Gotham" actress insists the couple will "never" divorce, despite oversharing about their previous marital discord.

"We are family," she said. "Take out all that whole marriage, relationship crap, at the end of the day, Will and I are family. I am going to hold him down, doesn't matter. All that relationship and what people think ideas of a husband, partner and all that, man, whatever. At the end of the day, that is a man that can rely on me for the rest of his life, period."