The Miniaturist reaches its climax this evening as heroine Nella Oortman begins to uncover the secrets of the Brandt household and the escalating dangers that await the household - does the miniaturist hold their fate in his hands? We spoke to writer Jessie Burton about how she came to write the novel on which the BBC's two-part series is based.

Q How did you come up with the idea for The Miniaturist?

A I was in Amsterdam on holiday. We went to the Rijksmuseum and that's where I first saw the real dolls house, which is actually called a cabinet, which became the symbol of the novel and my point of focus for writing it. I was immediately struck by how beautiful it was and how imposing it was, as well as intricate and intimate. Then when I found out that the woman who owned it, Petronella Oortman, spent as much money on it as a real house, I became interested in the psychology of the cabinet house and what it symbolised, both in regards to the city of Amsterdam and this woman is her domestic, claustrophobic existence. It took her 19 years in total to complete it and she hired the services of over 800 craftsmen and women in the city of Amsterdam and beyond. In my mind's eye all I could see was one woman, Nella, turning up at this imposing merchant house in Amsterdam and meeting, through the darkness, an imposing, authoritative, quite intimidating woman and the power play that would be exposed between them as they found their place with each other. I knew I wanted to write about women in society and the prejudices and obstructions facing them, and I wanted to write this house, an imperfect utopia where Johannes, Marin, Nella, Cornelia and Otto all exist and are allowed to be who they are without threat of death or ostracisation. I wanted to write about domesticity and claustrophobia but also about imagination - and that's where the character of The Miniaturist came in.

Q What research did you do when writing this?

A I started looking into the city of Amsterdam, its power and its relationship with the Dutch East India Company. Johannes, Nella's husband in the book, is a very successful merchant with them and I had to understand quite how powerful it was, as well as the tension in the city between wealth and piety, so I read history books and looked at paintings. Only once in the four years that I was writing the novel did I actually go back to Amsterdam, because I was working in London at the time and I couldn't just leave. I tried to give an impression of what Amsterdam was like, rather than giving the reader a history lesson so it was more about what food they ate, how they grieved, what their clothes were like...and then I layered all that in to give the viewers a sense of that authentic experience. The thing I found most fascinating when researching the book was probably the attitude towards women. I found some really interesting things: for example, in Amsterdam at the time women would marry later than in other European countries and would often work right up until that point. So there was this protofeminism and equality, but then at the same time there was an anxiety that certain women were getting a bit above their station. There was also a real neurosis over homosexuality. In the period that the book is set, there was a real witch hunt of gay men, who were murdered by having a huge stone put around their neck and then being thrown into the sea. That really chilled me. And you often see people from that period dressed in sober black - black was actually the most expensive dye - but they were lining their clothes with squirrel fur. So they looked very pious and modest but were actually quite epicurean in their tastes. There was also mass surveillance; neighbours were encouraged to watch and spy on each other to keep the peace. I found all of this personally very interesting.

Q Tell us a bit more about the cabinet houses.

A They were status symbols and not toys. When Johannes decides to give Nella a cabinet house as a wedding present he is intending it as an apology for what he knows is the truth of the situation. Plus it enrages Marin because it costs so much money, so it's both to please his new wife and get his sister's back up. Nella takes it as a bit of an insult - she's 18 now she doesn't want a child's toy - so his innocent intention is not particularly thought out. But Nella becomes more and more drawn into the miniature world and for me that is a commentary on our attempts to try and control our lives. It's a metaphor for Nella's development, furnishing her house and furnishing her life.

• The Miniaturist is on BBC1 at 9pm.