Mischa Barton confirms she dated Ben McKenzie while filming The O.C.

Mischa Barton has finally confirmed that she and her co-star Ben McKenzie dated at the beginning of filming The O.C.

Mischa and Ben, who played love interests Marissa and Ryan in the teen drama, were widely rumoured to be dating in real life during the show's run between 2003 and 2007 but she insisted at the time that they were just friends.

However, she confirmed the rumours during Wednesday's episode of the Call Her Daddy podcast.

"Yeah, that was my first... I had no idea what I was doing," she shared. "I think that kind of set things off on the wrong foot too because... we threw ourselves all into it very fast... It definitely was tricky that it happened right out of the gate and I felt overwhelmed and not ready for any of that."

The 38-year-old actress noted that the producers were concerned about the relationship because Ben was more than seven years older than her.

"I remember they were like, 'Mischa's disappeared with Ben and like she's only 17-and-a-half, 18.' The producers went to my parents. It was kind of a whole ordeal," she recalled. "That's in the beginning of the show before we're even halfway through a season."

When host Alex Cooper asked if she lost her virginity while filming the show, she replied, "Yeah, that's what I'm saying, I had no idea about relationships at all, or sex, and so it was like kind of a whole learning curve for me."

Mischa confirmed that she ended the relationship because she didn't feel mature enough.

"I mean, yeah, (it was) one of those things where you're so young and you've realised, 'I'm not ready for this. I have no idea what I'm doing,'" she explained. "(It was) overwhelming and too close to home. It would be a very very tricky thing to keep going on set... I felt not mature enough, younger than them (her co-stars) in that sense, I had not dated before."

The Sixth Sense star revealed they had already broken up when they filmed Marissa and Ryan's first kiss on a Ferris wheel in the first series. She confessed that they "hated each other at that point" but the intense tension between them worked for the show.

"I think he was really angry with me, to begin with, and I felt the punishment of that. I felt that from the producers as well, that they were not happy about that," she continued. "We had to just suck it up and get on with it but there was a lot of jabs behind the scenes and off camera."

Mischa and Ben continued to work together until Marissa was killed off in the season three finale in 2006. The actress also dated oil heir Brandon Davis and musician Cisco Adler during her time on the show.