'I was so angry I couldn't bear to touch him. Gone, in an instant, was the attraction I'd felt a few hours earlier'

The worst thing about Sri Lanka's sublime beaches is the sea: roiling breakers and a strong undertow. I was travelling there three years ago, and it taunted me as I lay on the beach. When I couldn't cope with the heat any longer, I'd hop across the scorching sand, wade in up to my knees and do a couple of ungainly plunges up to my neck to cool off, too scared to get in any deeper. Even then, I would usually get knocked off my feet by the surf.

One day, I rented a scooter with a fellow traveller at my guesthouse. We'd met a few days earlier: he was fun, flirtatious and handsome, and we'd embarked on a fling, sharing beers and bowls of spicy nuts, playing cards and dancing at one of the nightly beach parties.

We zipped along the coast and with each passing mile the beaches got emptier and emptier. We pulled up at one: miles wide, fringed with palm trees and dotted with the odd brightly painted fishing boat. It was deserted. We headed for the water.

At first we pottered in the shallows – he told me he couldn't really swim and I wasn't the strong swimmer I am today, so this suited us both. Then I tried some breaststroke, careful not to get out of my depth – I could feel the undertow, so I kept checking my feet could still touch the bottom. For one awful moment they couldn't and I paddled furiously back to shore, my heart pounding. Climbing out and planting my feet on the sand, I felt relieved to be back on solid ground.

It was then I realised I couldn't see my friend. I called his name and turned to see his head above water, 25 metres away. I knew that far out there was no way he could touch the bottom. He yelled: "I'm being pulled out! I'm being pulled out!"

I shouted back as calmly as I could – "You're fine! Don't panic! Just pull yourself back in" – and mimicked front crawl.

"I can't!" he shouted. "Help! Help!"

At that point, two scenarios raced through my mind: one, do nothing and hope he would somehow swim his way back in; two, leave the safety of the beach and swim out to him. It took me about four seconds to decide – the reality dawned that I simply had no choice. Despite my own fear, I couldn't stand there and watch him struggle or, worse, drown.

By the time I reached him, a couple of minutes later, he was drifting on his back, legs facing out to sea. It was as if he'd given up. I grabbed him by the armpit with my left hand and with my right pulled in a breaststroke action as strongly as I could. Staring up at the sky, he kept shouting: "Are we going the right way? Are we going to the beach?"

I was furious – with his shouting and the fact that he wasn't kicking or helping me pull him back in. We didn't seem to be making any progress – with each stroke forward, a wave pulled us back – so I swam harder, struggling to keep my own head above water as I supported what felt like an immovable weight. I wasn't aware of feeling frightened; I just focused on swimming and kicking as hard as I could.

After a couple of minutes, the beach looked closer, which gave me an extra sense of urgency. Eventually – and it's hard to describe the overwhelming feeling of relief this gave me – my feet hit the bottom. I let go of him, steered myself round to his feet and shoved him back towards the beach by his soles. As soon as I felt his body graze the sand in the shallows, I hauled myself on to the beach.

He followed, vomiting and choking as I lay there, face up, catching my breath. When he'd stopped, remembering my fury, I turned over and started hitting him. "You idiot! What the hell were you doing? We could both have drowned."

We lay there for about 15 minutes, then pulled on our clothes and walked back to the scooter in silence. I was still shaking as I perched on the back, hands grasping the handle behind me to avoid holding his waist. I was so angry I couldn't bear to touch him. Gone, in an instant, was the attraction I'd felt a few hours earlier. I wanted to be as far away from him as possible.

Back at the guesthouse, I went straight to my room. Would he have given up so easily if I hadn't been there? Would he have gone in the water in the first place? What was I thinking, swimming on an empty beach? As for us, the fling was over – and I didn't dip a toe in the sea for the rest of the trip.

• Do you have an experience to share? Email experience@theguardian.com