Mark Wahlberg says he and co-star Leonardo DiCaprio butted heads

Mark Wahlberg and Leonardo DiCaprio have starred in two films together — 1995’s The Basketball Diaries and 2006’s The Departed — but it wasn’t always smooth sailing.

According to the Hollywood Reporter, Wahlberg referenced past turmoil with DiCaprio in a speech he gave Tuesday at the annual LEAP Foundation conference at UCLA. LEAP is a leadership program aimed at high school and college students.

Mark Wahlberg and Leonardo DiCaprio, pictured in 2011, have pushed past their initial bad blood. (Photo: Frazer Harrison/Getty Images)

Wahlberg told the 500 students in attendance that he and DiCaprio initially clashed over their roles in The Basketball Diaries. The drama, based on late poet Jim Carroll’s journals, starred DiCaprio in the lead role, with Wahlberg cast as his friend, Mickey.

“He didn’t want me for the part, and I didn’t think he was right for the part,” Wahlberg admitted. “We both had to really learn how to respect each other, and we earned it.”

The film marked Walhberg’s second movie role, following a minor part in the 1994 Danny DeVito military comedy Renaissance Man. At the time, he was best known for his music career and Calvin Klein underwear campaigns. A 1994 Los Angeles Times article reports that the then-rapper had to read for the part six times, and “talked trash” with DiCaprio on the set.

Wahlberg, left, said he and DiCaprio clashed over casting for their 1995 film, The Basketball Diaries. (Photo: Time Life Pictures/DMI/The Life Picture Collection/Getty Images)

Wahlberg added that he and DiCaprio eventually resolved their issues. They went on to star in Martin Scorsese’s The Departed — for which Wahlberg earned an Oscar nomination in the Best Supporting Actor category — and have been photographed together at basketball games and Hollywood functions.

Wahlberg has referenced his DiCaprio drama before. In a 2015 interview with HuffPost, he admitted being a “punk” to his co-star.

“We had a weird run-in at an MTV Rock and Jock basketball game,” he recalled. “I was performing in my underwear at halftime, and I think I had blocked a shot of his. I was a punk. I was a prick. I was not nice to Leo that day.”

He also shared that he once turned up eight hours late to a reading, which “pissed” DiCaprio off.

“Leonardo said, ‘No way, I’m not making a movie with Marky Mark,’” Wahlberg claimed. 

He added that he had his own doubts about DiCaprio, whose role required playing basketball.

“He wasn’t a New York street guy basketball player,” Wahlberg told HuffPost. “I was like, ‘I’ve seen this dude play ball!’ So we both had a bit of a chip on our shoulder. But we started reading the scenes — and I looked at him and he looked at me — and I was like, ‘Oh, s***. This guy is good.’”

And the rest is Hollywood history.

Read more from Yahoo Entertainment: