I have been doing triathlons for nearly 20 years now. I am always aware of the danger of sharks when ocean swimming, but where I train, Corona del Mar in southern California, is considered a safe area. I always thought it would be more likely for me to have a car accident than be bitten by a shark.

On 29 May last year, I was training for a half Ironman race. I decided to do my swim training that afternoon and spend the day at the beach with my husband, Alex, our son Lucas and his friend. They were waiting for me on the beach when I started out around the buoy line, 200 yards from the shore.

I was finishing my first loop when I felt jaws coming around my torso and a piercing pain. The water was murky, so I couldn’t see anything. It just came out of nowhere and then it was gone in a flash. I knew it was something really big and assumed it was a shark. I panicked, but knew I needed to get out of the water. I was kicking furiously in case it came back. There was a lifeguard boat close by, so I waved my arms in the air and screamed for help. It got to me within 20 seconds.

At that point I didn’t feel anything; adrenaline had taken over. The lifeguards grabbed me under the arms and pulled me up out of the water. Then the pain kicked in and it was pretty intense. My tricep had been ripped off my right arm (the shark had grabbed me from the right side). I felt a lot of warm, gushing blood. The lifeguard put a big piece of gauze on my arm to soak it up and a tourniquet to slow down the bleeding.

My chest felt heavy, as if someone had put their foot on it, and I was having trouble breathing. It was excruciating. When I got to the hospital, I told the nurses to put me to sleep because of the pain. I just wanted them to fix me.

I woke up in intensive care after surgery, four hours later. Alex later told me I had some broken ribs and my tricep had to be reattached to my arm. Doctors said it was ripped off down to the bone, but it must have still been attached near the back, because my scar doesn’t go all the way down. After surgery, my doctor was amazed when I managed to wiggle my fingers: the bite just missed a major nerve. My right lung had collapsed; I had a fractured pelvis and the femoral nerve in my thigh was cut, so I have reduced sensation at the top of my leg. The shark also bit through my upper back muscle.

I had staples everywhere, 161 in total. They all came out after two weeks and I was able to walk, bend my arm and work on my range of motion. My lower back was sore, but I got a little better every day.

Local experts determined that the shark was probably 9-10ft long. It was a juvenile, about seven years old. It just grabbed me, left and didn’t come back because it figured I wasn’t food. That one bite went pretty deep, through multiple muscles and ribs.

I’m lucky to be alive. The fact that my arm and pelvis bore the brunt of the impact prevented the shark from piercing major organs. Things could have turned out differently, but I am not the type to dwell. For me, it was business as usual: focus on recovery and start doing something.

I started swimming again last July, less than two months after the attack, gentle running in August and riding my bike in September. My core was still strong because of all the pilates and yoga I’ve done. I did get tired, and breathing was hard because of my broken ribs, but I kept going.

In October, I did a triathlon in San Diego. When I got in the water, I was comfortable. My race brain took over and I knew the risk of a shark attack was minimal – it was a protected bay, with only one entrance and exit, so the chance of anything big swimming in was slim. The whole race took me one hour, 10 minutes and seven seconds. I was ecstatic.

I’m glad I did it, because it gave me the motivation to keep moving forward. But I don’t know if I’ll want to go back to Corona del Mar again. I think that would be too much.

• As told to Marissa Charles

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