Line of Duty star Gregory Piper has penned an emotional goodbye to fans after it was confirmed his character had died at the beginning of last night’s episode.

He has also teased fans ahead of the series six finale next week.

Last week, fans were left wondering who would come out on top as the show ended with Ryan Pilkington and Kate Flemming in a stand-off.

But as Pilkington died of two shots to the chest, the 23-year-old actor, who has been part of the show since series 1, wrote to fans on Instagram.

"If only they had got him a Big Mac. PC Ryan 'The bent b*****d' Pilkington' over and out,” he said.

"Let's face it. He had it coming!

"What a privilege it's been to work on this show. Every day I was still 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 family to me now."

He added: "What an experience. It's not lost on me how lucky I am. Jed Mercurio gave me an absolute gift with Ryan, his scenes and character journey have been the stuff of dreams and I'm so grateful.

"It's a well-oiled, hard-working and talented machine and that was only emphasised when we filmed through the pandemic.

"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 [sic] and funny bunch you'll ever meet. I have so many amazing memories.”

Peeblesshire News: Line of Duty creator Jed Mercurio. (PA)Line of Duty creator Jed Mercurio. (PA)

He continued: "This show meant so much to me and 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 has currently watched and supported. I'm completely overwhelmed by the response and couldn't be more proud of the whole team.

“LOD has the best fans (who also make brilliant detectives). Stay tuned because you're in for an absolute corker of a last episode next week."

Line of Duty returns for the series finale next Sunday, where fans will be hoping the identity of “the fourth man” is finally revealed.