WARNING: Spoilers ahead.
Pilkington was revealed to have been shot dead by DI Kate Fleming, after the pair’s armed stand-off last week left viewers with an agonising wait to find out who’d survived.
Following Sunday night’s episode, Gregory shared a lengthy post on social media paying tribute to the cast and crew, alongside some photos from his time on the show.
Admitting that Pilkington – a member of the organised crime group who’d embedded himself in the police force – “had it coming”, Gregory wrote: “What a privilege it’s been to work on this show. Every day I was still as mind blown and excited as I was when I was 13 in series 1.
“The nicest and most welcoming group of people I have ever met. I had the most fun and it’s something I’ll never forget. I know it’s cliche but I wouldn’t say it if it wasn’t true, they’re like a family to me now.”
He continued: “The whole crew off camera are the glue that holds us all together. The talent both on and off screen is what makes this show so good. And the support from everyone, through each department, is what makes the experience so special. It’s a well oiled, hard working and talent machine and that was only emphasised when we filmed through the pandemic.
“What an experience. It’s not lost on me how lucky I am.”
Thanking the show’s creator and writer Jed Mercurio for giving him “an absolute gift” with Ryan, Gregory continued: “His scenes and character journey have been the stuff of dreams and I’m so grateful. To have acted in scenes with the absolute power houses of actors that I have has been a masterclass. Along with the incredible directors across S1, 5 & 6. The loveliest, most support and funny bunch you’ll ever meet. I have so many amazing memories.
“This show has meant so much to me and has changed my life and if I could go back and tell little Greg what his life had in store his mind would explode.
“Thank you to everyone who’s watched and supported. I’m completely overwhelmed by the response and couldn’t be more proud of the whole team.”
Gregory also thanked fans of the show, who he joked “make brilliant detectives” and teased that they are “in for an absolute corker of a last episode next week”.
Referencing his debut appearance in Line Of Duty’s first series when he was a teenager, Gregory signed off: “If only they’d have gotten him that Big Mac… Ryan ‘the bent bastard’ Pilkington. Over and out.”
Sunday night’s episode saw DCI Joanne Davidson take the rap for shooting Pilkington, as she faced interrogation from AC-12 over her involvement with the OCG.
While the Crown Prosecution Service were – in DCS Patricia Carmichael’s words – “gullible enough” to believe her, the smug superintendent knows that forensic evidence points to Fleming being the real perpetrator.
Pilkington was not the only character to be killed off in the episode, as the much-discussed Marcus Thurwell was found dead at his home in Spain, before actor James Nesbitt had even made his first proper appearance in the show.
However, there’s evidence to suggest that all might not be what it seems with his death...
Line Of Duty concludes on Sunday at 9pm on BBC One.