‘Peaky Blinders” has pulled a stunning twist — bringing back one of the show’s best-loved characters.

Alfie Solomons (Tom Hardy), who was shot in the face and presumed dead in the gangster drama’s fourth season, returns about halfway through the Season 5 finale.

“Characters reach a point where they serve their purpose,” says “Peaky Blinders” creator Steven Knight about initially writing Alfie off the series. “However, subsequent to shooting [his Season 4 death scene] I began to think, ‘What a shame we don’t have Alfie.’ Tom [Hardy] was of a similar mind. Tom loves the character.”

Already renewed for a sixth season, the British drama (BBC/Netflix) follows Tommy Shelby (Cillian Murphy) and his crime family in post-WWI-era Birmingham. It’s a hit in the UK; the Season 5 finale snared a series-record 3.8 million viewers and it’s attracted a slew of high-profile American fans, from Brad Pitt to Snoop Dogg, who’s covered the show’s theme song “Red Right Hand.”

Hardy’s Alfie Solomons, a recurring character since Season 2, is an eccentric Jewish gangster and also Tommy’s ally. Equal parts philosophical and violent — and prone to entertainingly rambling monologues even when staring down the barrel of a gun — he returned in the Season 5 finale sporting facial scars and one blind eye from the bullet shot into his face.

“I was undecided at that point [of filming his death scene]” says Knight about Hardy’s return. “I didn’t want, for example, to see a funeral. I just wanted [the shooting] to happen, and it left me with that option. A lot of it has to do with how fans are reacting and also how the actor is reacting and how I feel the story should move.

“So lots of things came together to make me think, ‘Let’s bring Alfie back. I can, so I will.”

Knight says his decision to resurrect Alfie was partially influenced by fans’ reactions to Alfie’s fate in Season 4.

‘Tom is very pleased the character has struck such a chord across the world.’

“I try to avoid social media where possible, it’s more … you meet people who say, ‘I love Peaky Blinders’ and they’d say, ‘Is Alfie coming back?’ So I could tell there was a groundswell of concern,” he says.

“I’ve spoken to people who say they leapt up and punched the air as if a goal had been scored in soccer when they heard his voice [in Season 5]. I’m pleased at that reaction, and Tom is very pleased the character has struck such a chord across the world.”

Knight says it also made sense to bring Alfie back, since one of the show’s pivotal characters this season is British fascist leader Oswald Mosley, played by Sam Claflin.

“I just couldn’t resist having Alfie Solomons still alive to witness this,” says Knight, who’s coy about Alfie’s return in Season 6: “I cannot possibly reveal.”

Up next for Knight is the sci-fi epic “See” on Apple+ starring Jason Momoa (“Game of Thrones”). The series, premiering Nov. 1, is set in a dystopian world where most humans are blind.

“I always enjoy doing more than one thing so that I can jump between different worlds. It keeps everything fresh,” Knight says. “I don’t know where the idea came from, but I remember one morning just contemplating how humanity would survive without vision.”