“Magnum P.I.” is coming back for more action, and the fans are a big reason why.

Star Jay Hernandez thanked fans on Twitter Sunday for helping to get the show renewed for seasons 5 and 6 after it was cancelled by CBS.

READ MORE: ‘Magnum P.I.’ Rescued By NBC After Being Cancelled By CBS

The network announced the cancellation of the series last month, but last Thursday, Deadline broke the news that NBC had come to the rescue, picking the show up with a two-season, 20-episode order.

In a video shared to Twitter, Hernandez celebrated, telling fans, “OK, I’m sure by now you have all heard the great news. Magnum P.I. got picked up for a fifth season.”

“Thank you to the fans for the tremendous effort. I mean, you guys had petitions going, you got a billboard in Times Square,” he said. “Because of all that noise you made, we now have a new home at NBC. See you in season 5!”

Co-star Perdita Weeks also celebrated the news with a photo on Instagram:

READ MORE: ‘Hawaii Five-0’ Set For ‘Magnum P.I.’ Crossover

Actor Stephen Hill also celebrated the renewal on Twitter, and thanked all the fans.

Following the news of the show’s cancellation, fans launched a “#saveMagnum” campaign to get the show picked up. The campaign included online petitions and a billboard in Times Square.