Returning home from work one night, Elizabeth Day was viciously mugged yards from her front door. She was surprised by the reckless way she defied her attackers, but even more by how little she knew herself

When I was about 14, a woman came to our school to talk about self-defence. She was a lady in late middle-age, with sensibly cut white-blonde hair and a pair of plastic-framed spectacles. There was about her a pervading air of kindness and motherliness.

Her homely appearance was distinctly at odds with the rather extreme and frequently violent things she suggested we do to ward off potential attackers. We were shown how to transform a bundle of keys into a makeshift knuckle-duster in order to inflict maximum damage. If that failed, we were advised to go for their eyes with our fingers. All of this was delivered in the kind of soft, fluting voice more readily associated with a WI demonstration on flower arranging.

But years after this talk, when I first moved to London, I felt strangely reassured. On the odd occasion that I found myself walking home at night from the tube across a stretch of dimly lit parkland, I would remind myself of the bunch of keys in my handbag that I could whip out with lightning speed to deter any would-be rapist. I walked briskly and confidently, flexing my fingers in readiness for a spot of eye-gouging, feeling that I would be quite able to fend off any pursuer with a swift knee to the groin. The longer I lived in London, the savvier I felt. It was not confidence exactly, but more that I began to believe I knew how the city worked. I trusted my instincts to keep me safe – my instincts and my bunch of keys.

It was a Sunday evening in November 2005 when all that changed. I was living in a gloomy part of Tottenham, in a flat on a residential road that curved in a wide arc from a bus station at one end to a scattering of kebab joints at the other. I was returning from a work trip and was carrying more bags than usual: a laptop over one shoulder, my handbag over the other and in my right hand, a plastic bag filled with clothes. It was dark by the time I got out of the tube, the air dense with cold.

I was about 200 metres from my front door when a group of young men appeared around the corner in front of me. I clocked them swiftly, without making eye contact. There were four of them, all teenagers. Out of the corner of my vision, I could make out a blur of puffa jackets and trainers. They stopped talking when they saw me, the low murmur of their chatter dropping like a stone through water. But although I felt a brief shiver of apprehension at their presence, nothing happened. They walked on without comment, one of them stepping off the kerb and into the road to make space for me to pass.

I walked on. There was no one else about. The houses on either side of the street were shuttered and quiet. The only light came from a nearby lamppost, the bulb stuttering so that the yellowish beam flickered on and off. Then I heard footsteps: someone sprinting towards me from behind; the scuffle-slap of his rubber soles against concrete getting louder and closer with each passing beat. I could hear this person running, running, running and I knew, in a split-second of pure certainty, that I was going to get mugged.

Someone pulled hard on my laptop case, snapping my shoulder back with the force of the movement. I reeled, noticing as I stumbled that the four of them had formed a sort of circle around me. None of them said anything and somehow this silence, the sureness of it, was more lethal than noise.

A face emerged from the darkness: young, male, with chubby cheeks and expressionless eyes. A hood cast the rest of his features in shadow. He pushed me against a wall, grabbing hold of my handbag with one hand, tugging at it to make me let go. I kept hold of it, clasping the straps tightly in my hand. He raised his right arm and slammed it down across my face. I remember thinking that it did not hurt as much as I thought it would. I looked at him blankly, my thoughts confused. My attacker lifted his arm again, thumping the flat of it along the side of my skull. My head twisted back; the tendons in my neck slackened.

He tried again to grab hold of my handbag but again I refused to let go. I held on to it and the only thing I said, throughout it all, was a hoarse, semi-whispered: "No." I did not scream or shout for help. I did not have my bunch of keys at the ready like a makeshift knuckle-duster. In fact, I did not fight back at all. I did nothing. Except, for some reason, I refused to give him my bag. I remember thinking, quite clearly: I'll let him hit me until it starts to hurt and then I'll give him the bag.

I was dimly aware of the other three men loitering uneasily on the pavement, awaiting direction from the ringleader. He hit me one more time in exactly the same way, the rustle of his anorak sounding like the crackle of burning leaves as his arm made contact with my skull. Still, I held on.

One of the other boys, impatient at the lack of progress, made a sudden lunge for me, knocking me to the ground. I could feel the laptop being taken and I had no energy left to care. Lying there on the pavement, the coolness of the stone pressing against me, I realised how stupid I had been to resist. Once they had the laptop, they were satisfied. They ran into the darkness without a word.

It was only then that I began to be scared. The plastic bag I had been carrying had been slashed in two, its contents taken. The laptop had gone and with it my iPod. One of my shoes was lying on the road, several metres away from me. I had not even noticed I was barefoot. But my handbag, miraculously, was still mine, as were my keys, my wallet and my mobile phone. I stood up, collected the shoe and limped to my front door, put the key in the lock and fell into the hallway. Immediately, I called the police. When I spoke to them, I realised I was sobbing.

In the days that followed, I looked back at my behaviour with some astonishment. It did not seem quite real, as though I were trying to make out some faraway object through a layer of thick glass. By holding on to my bag with such recklessness, I had reacted in precisely the opposite way that I would have thought. I had ignored everything I had been taught that day at school about the best way to deal with a mugging which was to scream for help, to give them your bag then get away as fast as you can. I think, perhaps, it was the unfairness of the attack that made me so stubborn: the idea that a stranger could steal something from me that was mine. And that, in the end, overrode my instinct towards self-preservation.

It was stupid of me, especially because the police told me later that the muggers probably had a knife (the slash through the plastic bag had been made so cleanly it suggested some kind of blade). For whatever reason, they did not use it on me. It had, in the end, been quite an amateurish effort: I suspect that, when they came across me, I seemed like an easy target. And in a way, I did not blame them for trying.

For about three months after it happened, I felt frightened. When I walked to the tube in the morning, I would take a lit cigarette with me, believing that it would be a more effective weapon to stab in someone's face than a bunch of keys. In the end, I sold my flat and moved to a different part of the city.

I suppose I realised, once the keys to the flat had been handed over and I drove away without a backward glance, that you can never truly know how anyone will react in an extreme situation. You can be taught the right thing to do, you can have it drilled into you and you can believe that you will carry this out, but, in the end, we are unpredictable beasts. People make the most extraordinary decisions and can behave in wholly irrational ways. They are constantly interesting. I thought I knew myself fairly well before I was mugged, but I didn't. I simply knew what I ought to do, not how I would actually respond.

If it happened to me again, I like to think I would hand over my bag without question. But I have no means of knowing whether this would be so. I suppose, in some respects, this is why I will always be endlessly curious about people because, however many questions you ask, however many scenarios you might imagine on the page, no one will ever truly understand what goes on beneath another person's skin. And that, in its own way, is a wonderful mystery to keep unravelling.

Elizabeth Day is a writer on the Observer. Her debut novel, Scissors, Paper, Stone (Bloomsbury, £11.99) is published on 4 January