Many were shocked to see the death of one major character in the latest episode of ABC's Once Upon a Time, even the actor who played him!

***Spoilers for the most recent episode of Once Upon a Time ahead***

Fans were devastated to see Robin (Sean Maguire) lose his life in Sunday night's episode of Once Upon a Time. Robin died while protecting Regina (Lana Parrilla) from Hades (Greg Germann), stepping in front of her when the lord of the Underworld tried to attack her with the Olympian crystal.

The moment was crushing for fans of Regina and Robin's relationship, colloquially referred to as "Outlaw Queen." Maguire spoke about the final moment for Robin in a new interview with TVLine.

"I was a little shocked, to be honest. I didn't expect that, because given what the writers had written, the fans and I sort of believed there was a different path for Robin. But I have always said that my job as an actor is to serve the writing above all else," Maguire said. "[Series creators Adam Horowitz and Eddy Kitsis] obviously have a plan for their show, and this was part of it. Obviously I was disappointed to say goodbye to my castmates because we bonded in a way that doesn't happen very often on a TV show, but I was really disappointed for the fans. I think the majority of them believed that Robin and Regina were supposed to end up together, that there would be hope and a happy ending. But it appears the story is taking a different turn."

As for whether Maguire will ever return to the show as Robin through a flashback or some other narrative device, the actor was uncertain. However, Maguire seemed to suggest that even if he were to be asked back for whatever reason, he may turn down the opportunity.

"I tend to feel that once I've played a character, I've done that. But you never know. I never say never, but at the moment I'm looking forward to a new challenge and a new chapter. We'll see!"

Once Upon a Time airs Sundays at 8 p.m. ET/PT on ABC.

Watch the trailer for the season 5 finale of Once Upon a Time here: