With HBO’s latest documentary series ‘The Defiant Ones,’ it’s pretty obvious that Allen Hughes is a true master at work.

And boy did he have his work cut out for him.

The veteran director of films such as ‘Broken City,’ ‘The Book of Eli,’ ‘Dead Presidents’ and the breakthrough ‘Menace II Society’ has mastered the seemingly impossible task of chronicling the unfiltered, untapped and untold stories of two of the music industry’s most iconic producers of the past half century: Dr. Dre and Jimmy Iovine.

After poring over hundreds of hours of archival footage, conducting scores of in-depth interviews and using an extended timetable of three and a half years (final edits were done last week), Hughes has a project on his hand made for the history books.

For the four-part event, premiering this week, the very separate stories of two boys from humble beginnings converge into a full-scaled documentation of how they conquered the world of music, individually and then together. Beating many odds, just about everything detailing the ultimate (and history-making) union is presented in ‘The Defiant Ones’ — from the good, the bad and the ugly. Hence the title.

Director Allen Hughes. courtesy of HBO

According to Hughes — who is flying solo as a world class auteur these days (it was with his twin brother Albert Hughes that he crafted cinematic magic with in the gritty 1990s films ‘Menace II Society,’ ‘Dead Presidents’ and ‘American Pimp’) — the project came together by chance.

Related: Food Truck Gives Incarcerated Youth a Second Chance

“Dre and I were working on this music video with Eminem … and talked about doing his life story. This was way before ‘Straight Outa Compton’ now. Come to 2013, we finally figured out a way to do a documentary,” the Detroit native told NBCBLK last weekend. “I took it to HBO, and HBO says, ‘Great, we're down. But there's only one problem.’ I said, ‘What?’ They said, ‘We're making a documentary with Jimmy Iovine about Interscope [Records].’ I said, ‘Oh s---, I'll call you back.’

“Then a light bulb went off. I said, ‘Oh, because I've known Jimmy and Dre for over 25 years independent of one another.' I just thought it would be great because they have such a unique partnership and I could tell a dual story. That's how it came about.”

Most music fans know Dr. Dre (government name: Andre Romelle Young) from his seminal work with the west coast rap outfit N.W.A. and his producing prowess with gold and platinum-selling acts such as J.J. Fad, Snoop Dogg, Tupac Shakur, Eminem, 50 Cent, The Game and most recently Kendrick Lamar.

The Morning Rundown Get a head start on the morning's top stories. This site is protected by recaptcha

But one would have to really be entrenched in the actual business of music to know the bespectacled Iovine outside of a periphery glance (perhaps from mentions on songs, liner notes and acceptance award speeches).

The Brooklyn native cut his teeth as a protégée of 1960s pop singer/songwriter Ellie Greenwich and then as an engineer for Bruce Springsteen, who later catapulted into an in-demand record producer for groundbreaking rockers Patti Smith, Tom Petty, Stevie Nicks and U2, among others.

Many moons later, he would become a music industry maverick with an uncanny vision to bolster the brazen onto the pop music scene. From Nine Inch Nails and Marilyn Mason to Suge Knight and Tupac Shakur, Iovine proved to be no-holds-barred risk-taker — a matchless peer who turned the mainstream music business on its ear.

Dr. Dre, Jimmy Iovine. Joe Pugliese /AUGUST/courtesy of HBO

His bond with Dr. Dre after a tumultuous split with Death Row Records, would further tighten via the launch of Aftermath Records — which endured a few misses before striking platinum with a crop of millennium rap icons.

Like most music-focused documentaries, a cavalcade of hit makers are presented in ‘The Defiant Ones’ as talking heads. But Hughes sought out to get the stories behind the stories. And in some cases, revelatory and little known nuggets were brought to light. Even from the main subjects. The viewer gets inside access to the workings and trappings of rap and rock’s most daring duo.

“I think it was shocking overall was the fact that Jimmy and Dre were brave enough to open up and reveal things that were very embarrassing, that most people wouldn't reveal. I didn't know a lot of times inspiration comes from people showing their vulnerabilities, and they allowed me to show their vulnerabilities,” Hughes confessed.

Related: Super Diva Patti Labelle Talks Walmart Treats and Dream Duet

Many bold-faced names dedicated time to the filmmaker for the project. Ice Cube, Gwen Stefani, Snoop Dogg, will.i.am, Eminem, Trent Reznor, Tom Petty and Kendrick Lamar are just a few who offered up revealing anecdotes, alongside the aforementioned legends. And insightful interviews with everyone from close family members and ex-lovers to business adversaries and media personalities added full color to the film.

For instance, Fleetwood Mac frontwoman Nicks opens up about how Iovine and she had a love affair while producing her groundbreaking solo debut and how she had to hide in the basement from Petty during the recording process. She also mastered making pizza out of English muffins.

Snoop Dogg reveals how he adamantly preferred ‘The Source’ magazine over ‘Rolling Stone’ after some initial prodding from Iovine, who knew what the more mainstream outcome would be in the long run. The n-word laden rap personality also opened up about the messy East Coast/West Coast hip-hop war and losing Shakur due to it.

Allen Hughes. G L Askew II/courtesy of HBO

Nas pops up giving his take on the hip-hop beef and reflected on the 2005 Source Awards drama incited by none other than Suge Knight. And so does Sean 'Diddy' Combs — who also later offer personal musings about Iovine.

Elsewhere, N.W.A. members The D.O.C., MC Ren and DJ Yella offer up rarely known insights about Dr. Dre in his early days. There’s even exclusive footage from his World Class Wreckin’ Cru early days.

The discovery stories of how Gwen Stefani and Lady Gaga get great play too.

Additionally, Iovine is quite candid about how the pair’s whopping $3-billion deal with Apple almost went up in smoke after R&B singer Tyrese prematurely bragged about it with a drunk Dr. Dre on Facebook.

The film opens with the brouhaha about The Beats/Apple deal and how Dr. Dre was originally approached, rather assumingly, to front a line of sneakers. Iovine and his sharp business acumen — told in more expletive detail — pushed him to use his brand and likeness for speakers and not sneakers. After all, wouldn’t it be a no-brainer for a world-renowned hit-making producer to do something more audio focused?

“I thought the fact that Dr. Dre and Jimmy, even allowed that to be in the film was shocking,” Hughes explained. “It also taught us a lot about their relationship and how deep their bond is.”

Jimmy Lovine and Dr. Dre on November 9, 2012 in London, England. Simon Burchell / Getty Images

One aspect of ‘The Defiant Ones,’ Hughes is most proud of was the inclusion of Dee Barnes, the former TV host who was brutally assaulted by Dr. Dre in 1991 at a Los Angeles party in the aftermath of Ice Cube leaving N.W.A. The controversial incident remains a blemish on Dr. Dre’s legacy although it was conveniently left out of F. Gary Gray’s blockbuster 2015 biopic ‘Straight Outta Compton.’ And the omission brought on more controversy — 25 years later.

“First of all, the disdainful thing about all this is that Dre's reaction and his apology, we shot that a year before ‘Straight Outta Compton came out.’ We had it in the can,” Hughes revealed. “I couldn't tell Dee because I didn't want to contaminate the interview when I ultimately did interview her. It was painful to see her have to go through all that, and Dre have to go through all that. I had to keep a secret that we had Dre's apology. Not just apology, talking about it in the can a year before ‘Straight Outta Compton‘ was even in the theaters.”

Related: Juice Generation: Angela Yee Brings Her Fruit Infusions to Brooklyn

He continued: “[Dee] was a part of the hip-hop culture with her group Body and Soul … the host of ‘Pump It Up’ … she was like a little sister on the L.A. hip-hop scene to the guys in N.W.A. Our meeting was important. Once I sat with her and saw how strong she was, how smart she was, how funny she is, what an activist she is as a woman, I thought it was critical that she be a part of the film, not just that part of history where that awful thing happened, but be a part of the culture of the film. When she agreed to do it, I've got to say was probably my proudest moment.

Hughes, an admitted avid fan of documentaries, said pushing the medium was a top priority for the project.

“Most people look at documentaries like eating your vegetables. So it's got to be some kind of great experience. I went in like a record producer would go into it, like a DJ would go into a party. I said, ‘I've got to make sure that I'm DJ-ing this movie because I'm essentially making a movie about the world's best DJ anyways.’ I'm making a movie about producers. I've got to make sure the way I approach everything is the way a DJ would approach it.

Dr. Dre, Jimmy Iovine and Allen Hughes attend "The Defiant Ones" premiere at Time Warner Center on June 27, 2017 in New York City. Michael Loccisano / Getty Images