Agatha Christie, obviously.

Dorothy L Sayers, probably. Marjory Allingham, possibly. But how long would it take you to get to Josephine Tey if I asked you to name the leading writers of the golden era of detective fiction? Indeed, would you get to Josephine Tey at all?

It's not that the Scottish novelist and playwright is forgotten - far from it - but she is somewhat neglected compared to her more famous contemporaries. Tey's detective novels were massively popular in the 1930s and 40s and deserve to be seen as classics of the genre, but, partly because her work has not been kept alive by movies and television in the way the novels of Christie, Sayers and Allingham have, she has rather faded in the collective memory.

There are other reasons for Tey's relative lack of status: she wrote much less than her contemporaries (there are only eight novels compared to Christie's 66 for example). She also didn't always stick to the rules and conventions of detective fiction - for a start, her novels don't feature an eccentric detective in a monocle or a moustache (her detective Alan Grant is a very ordinary police inspector) and in one of her books, there isn't even a murder. And whereas Christie was obsessed with the intricacies of the puzzle, Tey was more interested in the psychology; it wasn't the moment of violence that excited her, or even who did it, it was the aftermath.

All of these elements of Tey's work may help explain why she has not endured quite as much as the repeatable, collectable Christie, but for the novelist Nicola Upson, they are also reasons to admire Tey. So intense is Upson's admiration in fact that since 2009, she has been writing a series of detective novels with a surprising twist upon a twist: Josephine Tey is the heroine and detective.

The first of the Tey novels was An Expert in Murder, the latest is London Rain, and all of them feature a semi-fictionalised, semi-true version of Tey. It is an unusual literary trick to pull - making a leading exponent of a genre a character in that genre - but Upson did it because her love of Tey made her want to tell the writer's story. It was only when she realised there wasn't enough material around on the very private Tey for a biography that she switched tactics and put her into fiction instead.

Over the years, the process of writing those novels has only intensified Upson's interest in the author and made her more determined to help reinstate Tey's status as one of the greats.

"I don't think plot was Tey's strong point as it is with Christie and she's not the elegant writer that Sayers is," says Upson, speaking from her home in Cambridge. "But with her, it's about characters and sense of place and moral complexity and it's most of all about her, and that's why I started these books because I loved her work. It's that voice, it's that warm, wry, intelligent, sarcastic, slightly forbidding voice."

Upson's favourite novel of Tey's is The Franchise Affair, which was published in 1948 and relates a police investigation into a mother and daughter who have been accused of kidnapping a young woman. Upson loves it because of its unusual heroines, but also because of its detective: Inspector Grant.

"For me he was the first credible, fictional detective," says Upson. "He wasn't Lord Wimsey or the little Belgian genius and he wasn't the sort of policemen you often get in Christie who are a bit thick - he was just an ordinary man. I remember talking to PD James about this - Grant also paved the way for the Dalglieshes and the Wexfords - ordinary, intelligent but very interesting for the reader. Tey was groundbreaking in that way."

But would she have approved of what Upson is doing now with her own novels: putting Tey, a real person, into a fictional world? Tey once said that to write fiction about historical fact is very nearly impermissible so the answer might well be no, but Upson believes Tey would have a grudging respect for doing something different because that's what she did in her own life. She was born in Inverness but was never quite comfortable with what she saw as its small-town mindset and she resolutely did not try to fit in. Upson also believes Tey was gay at a time when it was hard to be so in a small town, or anywhere else for that matter.

Upson uncovered these hidden parts of Tey's life while she was researching the biography-that-never-was. "I was lucky that many of the people Tey worked with and her close friends were still alive then -- I spoke to people like John Gielgud for example who told me wonderful stories which I gradually filtered in through the books, but there wasn't enough information for me to do a biography. But what I wanted to do was capture that voice of Josephine Tey."

So is Upson still trying to get to the true Tey through the novels or is she just making it up? "A bit of both really. As the books have gone on, she gets her own momentum - she's a character in these novels now and she behaves in the context of the fictional story." Upson also believes non-fiction isn't necessarily better than fiction at getting at the truth. "You can have the best biography in the world," she says, "but a character springs off the page of a novel much more."

The fact that the Tey character in Upson's novels is gay has caused some controversy, however. There is no publicly-available documentary evidence that Tey was a lesbian, so has Upson taken a leap in making her so in her novels? " It's not a leap," she says, "from the people I've spoken to and the various diaries and letters I've read from women to each other who were close friends, and from interviews I've listened to, that is my reading of it. I'm absolutely convinced of it.

"Also, in a way, you can't win, because I remember when An Expert in Murder came out, the very first review tore it apart because I'd given Tey a male lover during the First World War rather than make her a lesbian, which she obviously was. Now she's a few books on and I've explored her sexuality in a way that I think is faithful - there are lots of people who take exception to it and say completely the opposite. But the people I've spoken to were friends of hers."

London Rain, the latest novel, features a new love triangle for the character, but its strongest quality is the atmosphere of its setting: the coronation of George VI in May 1937. Some of the story is set in the streets of London as the crowds gather but much of it is set in the then-new Broadcasting House as the BBC prepares for the big day.

I tell Upson that with all the curious and sometimes eccentric detail of how the BBC worked, the novel feels like the comedy series WIA, but set in the 1930s. "It's exactly like W1A," she says, "and it's amazing how much of it is still relevant - the ageism, the sexism, the dumbing down of programmes. On the flip side of that, there was real pioneering and groundbreaking stuff at the BBC in the 1930s. There was a real trust in the creative people."

The victim in London Rain is the BBC's leading broadcaster Anthony Beresford, who is fictional, but there are plenty of real deaths in there as well. It is little known that among the big coronation celebrations in 1937, there were mysterious tragedies: a dead woman was found wrapped in paper in a furniture shop in Islington for example, and the fact that Upson has put that, and other small macabre details, into the novel lends it a bit of extra authenticity, even if you don't know it.

What Upson hopes is that London Rain and her other Tey novels will do something to revive Tey's prominence in detective fiction, but she also hopes others will feel the intense love and admiration for Tey that she does. "What Tey lacks in prominence she makes up for in the intensity of how much people value her," says Upson. "You could almost predict what other crime writers would have gone on to write, but it's almost impossible to predict what Josephine Tey would have written."

London Rain by Nicola Upson is published by Faber & Faber, £12.99