If you solved today’s Guardian cryptic (and if you haven’t, do so right away), you might have noticed a new setter’s name, and a setter with an especially devious style.

If you watched this evening’s episode of BBC comedy Inside No 9, you might have lost your appetite. And if you haven’t seen it yet, do so right away, because I’m afraid that the spoilers have already begun.

And if you did both – solved the puzzle, then watched the episode – then you probably had a worlds-colliding moment of deliciously giddying uncertainty. To answer the irresistible question: yes, the puzzle compiled by the fictional Prof Nigel Squires for a Cambridge university newspaper is the same one you solved in these pages. It’s reminiscent of (and inspired by) a 2008 conspiracy between the New York Times and The Simpsons.

Which means that Sphinx doesn’t really exist. Except, of course, someone had to write the clues and assemble the grid. That someone is Steve Pemberton who, like his Inside No 9 co-creator Reece Shearsmith, has also been responsible for The League of Gentlemen and Psychoville; he was also one of the Tillers team in a charity edition of Only Connect. So, let’s talk to Sphinx. (Full disclosure: I gave some small advice on matters crosswordy before shooting, and I am about to be praised, in the second paragraph of reply.)

Most people, if they set a cryptic crossword at all, don’t make their public debut a puzzle full of themed entries and multiple ninas. You like a challenge, don’t you?

I absolutely love a challenge and that’s what drew me to have a go at solving cryptic crosswords in the first place.

I spent years only being able to solve up to five clues per grid, sniffing out the anagrams like a truffle hog. The only piece of information I retained was that “worker” usually means ANT. Reading your excellent book Two Girls, One on Each Knee inspired me to think that there could be an episode of Inside No 9 involving cryptic crosswords.

The first thing that had to be done was the creation of the crossword itself. I printed off a blank grid and the hardest job was fitting in all the words. I believe you can get computers to fill grids for you these days, but I wanted to start with the nina. So on a diagonal line we needed the hidden message I SWAPPED CUPS. Then I knew I wanted ASPHYXIATION and PUFFERFISH, so there were three big chunky things to get me started.

I printed the grid out six times on a piece of paper and played around until one of the combinations threw up MYSTERY GUEST, which was useful, and then KNOW-IT-ALL and UNDERSLIP.

At the end, I found that I could put in the nice little flourish of NEUN.

The final nina that is seen in the episode, RIP NHS, we spotted at the last minute. We thought: “Well, that’s so close to the initials of Nigel Squires, who has just killed himself” that we had to use it, but most people think it’s a political statement.

Much of your narrative work involves misdirection and revelation: was that any kind of training for composing cryptic clues?

Yes, the art of misdirection is absolutely key when we’re writing Inside No 9. We try to second-guess the audience at every stage and imagine what they think will happen, then make sure we don’t go there. We also do a lot of “seeding”: once we know the ending (and we don’t always know the outcome at the start of the writing process), we go back and make sure that there are plenty of subtle clues seeded in to give it re-watchability.

Similarly, the perfect cryptic clue has a surface reading that takes you off in the wrong direction, and that can be as simple as a word that in the context of the sentence has one meaning and then you realise that all along you were blind to the meaning the setter intended. That feeling of satisfaction, of having been led up a blind alley and then shown the light: that’s the feeling we want from Inside No 9.

Many setters, faced with a blank piece of paper, use something arbitrary to get them going: a single piece of wordplay, or indeed a nina that determines much of what surrounds it. Do episodes in an anthology series also sometimes benefit from something random?

Absolutely! Some ideas have been buried in notebooks for years and it’s great to have an open-ended format that can give them life.

Other times, you’re just hit by a moment of inspiration. One of the best episodes in this series, Diddle Diddle Dumpling, is about a man who finds a solitary shoe in the street and becomes obsessed with finding who it belongs to and why it was left there. That happened to me on my way to work: the whole idea came instantly and fully formed. I took Reece out to see the shoe and we started writing it immediately. However, it has to be a random moment; if you go out looking for these ideas, they will remain hidden.

A key moment in The Riddle of the Sphinx is Tyler’s tirade: “I always hated cryptic crosswords. Why can’t people just say what they mean instead of trying to trick you all the time?” But since he’s the villain, I’ll presume that you didn’t mean this …

I think Squires and Tyler are both villains really, and you could certainly read Tyler as being a victim. We thought we should put the alternative point of view because, believe it or not, some people do hate cryptic crosswords!

They require a particular mindset, plus a lot of time and patience. You can’t learn how to do a cryptic in one or two sessions; you have to give yourself over to them over weeks and years.

I’ve had quite a good strike rate at getting people into that mindset, though. I’ve recently been in a play in the West End called Dead Funny; we had group solving sessions every day and I converted five or six people who had never attempted cryptics before. Ralf Little was particularly smart, he taught me a few things.

Cryptic solving can be a solo activity, sitting on a train or killing an hour at breakfast – but it can also be a very social thing, and pooling different opinions and knowledge bases can bring people together. It certainly got us through many an interval.

Whose crosswords do you enjoy in real life?

A real mixture. I confess that I don’t pay much attention to who has set the puzzle or what their particular quirks might be. I was delighted to discover that no one had the pseudonym Sphinx, which informed the elements of Greek tragedy that we wove into the script.

It’s a great honour for me to have a crossword in the Guardian as Sphinx, and I hold my hands up to the many mistakes I will have made in the cluing. I hope people will realise that I had to take some artistic licence. We changed the clue for 3d, for example, as the one in the programme would not have passed muster with the mighty Guardian crossword editor, but it made sense in the context of the show.

I usually buy the Times and I think their recent addition of a quick cryptic is an excellent starting place for people to learn the ropes. I used to do the Guardian crossword in Benidorm every day with the late, great Kenny Ireland who played the cheerful swinger Donald. I’m delighted to dedicate this, my first printed crossword, to him.