Before Downton Abbey became everyone’s guilty, or not so guilty, pleasure – well before viewers on both sides of the Atlantic were acquainted with Bates’s limp, Matthew’s ‘tingle’, Lady Edith’s poor choice in men and Mrs. Patmore’s soufflés, not to mention the Dowager Countess’s withering one-liners (‘What is a weekend?’) – I started to write a novel. A novel where the house was the main character.

I have made my living writing about houses, one way and another, all my life. About architecture, design – period and contemporary – about furniture and interior decoration. And all this time it had never once occurred to me that a house could be a subject for fiction, until one day in May 2008.

We visited the house by accident.

We were spending the weekend in Berkshire, about an hour’s drive from London, where we live. Our nest was newly empty and I was on a nostalgia fest. The plan was to visit a garden I loved years ago when I was growing up in a small village in the Thames Valley. But when we pulled up outside the garden it was closed. I’d got the opening times wrong.

OK, I said to my husband, let’s go to Basildon Park instead.  It’s not far away. I’d never heard of the house before, but there had been a leaflet about it in our relentlessly themed hotel bedroom, which said that it had been a location – Netherfield Hall – in the 2005 adaptation of Pride and Prejudice. (A plus for me, but a minus for my husband.)

Here you have to understand that my husband is a) an architect, b) from Yorkshire, c) largely averse to stately homes, particularly those dripping with the trappings of prestige, and d) not a great fan of period drama, which he lumps together under the general term ‘bonnets’. He has been known to brood on battlements.

We don’t have to go in the house, I said. But it has a good garden.

OK, he said.

We drove through the gates into Basildon Park and parked in the field. It began to rain. Heavily.

Well, we might as well see the house, I said. Since we’re here. Since it’s raining.

OK, he said.

So we bought our tickets in the stable block/gift shop and resisted the jam, fridge magnets and the tea towels.

It’s a fair walk from the car park to the house, all of it uphill, most of it through woodland. When we arrived at the entrance, we climbed up the stairs to the loggia, then went through the main door.

Have you been here before? said the guide.

No, I said.

You are in for a treat, he said.

Basildon Park is Palladian. It is almost, but not quite, symmetrical. As soon as we came into the house, we could see right through to a window on the other side. Everything lined up. You felt held. I glanced at my husband and there were tears in his eyes.

Well, that was a thing.

My epiphany came later. We were in our (relentlessly themed) hotel bedroom and I was reading the guidebook.

Many British stately homes have been handed down through generations of the same family. Basildon has not. The more I read about it, the more I understood that its mixed fortunes have mirrored the history of this country. This was the idea that got a grip on me that day. This was the genesis of Ashenden.

I finished the first draft of Ashenden in August 2010. Who’s going to be interested in it, I thought? Then came the first series of Downton Abbey. Oh, maybe someone…

I finished the second draft in the spring of 2011 and gave it to my agent. He called me in. Soon after – to my mind miraculously – I had a book deal with Penguin and some months later, Ashenden was sold to Simon & Schuster.

Where do ideas come from? I don’t know. You would think, given my career, that I could have seen this one coming, but I didn’t. Nor do I claim any kinship, creative or otherwise, with Julian Fellowes. All I know is that we both must have had a similar idea at the same time – to tell the story of social change in Britain through the changing fortunes of a big house, those who owned it and those who worked in it.

For thirty years I have lived in the East End of London, an area which until recently has been a byword for urban deprivation and is now the epicenter of urban cool. But we do have one National Trust property in the borough, the Tudor Sutton House, which was built as the home for Ralph Sadleir, Cromwell’s associate and a courtier of Henry VIII’s. Hilary Mantel visited the house to research her trilogy.

I’ve visited Sutton House many times over the past 20 years – out of curiosity, to help my daughter with a school project, to drink mulled wine at Christmas fairs, to celebrate a friend’s 40th birthday. And I wonder whether Sutton House put the notion in my head that such places could be microcosms of history.

Sutton House was built as the country retreat of a powerful courtier at a time when Hackney was a bucolic haven of strawberries and pretty lasses. Since then, it has been a school, a fire-wardens’ post in WWII, and a squat smeared with graffiti. Along with the linen-fold paneling that has formed the backdrop to many televised historical documentaries, traces of these varied pasts have been preserved in a sensitive restoration.

Dig. Dig deep. The census records of our old house, an unremarkable Victorian terrace, show that in the late nineteenth century, a tenant there was a woman called Lily Snowball, described as a ‘laundress from Whitby’. You couldn’t make it up. But who, I wonder, put the mezuzahs over the doors?