EXCLUSIVE: Masi Oka Says Goodbye to 'Hawaii Five-0' -- Check Out a Clip From His Final Episode!

Chief Medical Examiner Max Bergman is leaving the island after seven seasons on CBS' police procedural.

Chief Medical Examiner Max Bergman is getting ready to leave the island on Hawaii Five-0, but first, he’s taking a look back at how he grew close with his Five-0 “ohana.”

In ET’s exclusive sneak peek of series star Masi Oka’s final episode on Friday, titled "Ua ho'i ka 'opua i Awalua" ("The Clouds Always Return to Alawua"), Max (Oka) is packing up his office as Jerry (Jorge Garcia) peruses his journals.

“It says here McGarrett was a fugitive for a couple days?” Jerry reads. “He came to you for help?”

EXCLUSIVE: 'Hawaii Five-0' Star Daniel Dae Kim Previews His Most Intense Episode Yet, Addresses Show's Future

Max confirms the story before flashing back to one of his first encounters with Naval Reserve Lieutenant Commander Steve McGarrett (Alex O'Loughlin) six years earlier, when he helped shelter the Five-0 Task Force head after he “got shanked in prison.”

“I suppose that one might have a problem with a fugitive seeking shelter in their home, but truth be told, I was moved,” Max admits to Jerry in the present day. “Up until that point, our relationship was strictly professional. Commander McGarrett was taking a huge risk.”

“I was a sworn member of law enforcement, and I was duty-bound to turn him in. He knew that, yet, he still came to me,” the medical examiner recalls. “He trusted me. I saw him as a colleague, but he saw me as a friend.”

FLASHBACK: 'Hawaii Five-0' hits 100 Episodes!

Oka joined Hawaii Five-0 as a recurring cast member in its first season, fresh off his major breakout role as Hiro Nakamura in NBC’s Heroes. He was promoted to a main cast member in season 2. The 42-year-old actor opened up about departing the CBS police procedural back in November, saying that he thought his character had “done too much of everything he can do.”

“It’s been great to be honest with you,” Oka told Entertainment Weekly of his last days on set. “I love my crew, I love the cast, the writers. Typically, I’m like, saddened, but I was actually really happy, because I rarely get to say goodbye on a set.”

“In my past shows, we’ve had the unfortunate situation being canceled many times, so I never got a firm way of saying thank you to the crew, thank you to the cast,” he added. “It was just nice to know I had that and to really enjoy and kind of reflect on the amazing journey and experience that I had. I mean, seven years is a long time to be on a show and it was just beautiful.”

Hawaii Five-0
airs Fridays at 9 p.m. ET/PT on CBS.

EXCLUSIVE: Alex O'Loughlin Gets Candid About Why He's Ready to Step Away From 'Hawaii Five-0'