Maggie Montoya stepped onto a track for a 5,000-meter race for the first time since March, hoping to qualify for that event in the U.S. Olympic trials and not quite knowing what to expect. The result was a personal best a couple of months after the worst day of her life.

On March 22, Montoya sheltered with other pharmacy employees in an office behind the pharmacy at King Soopers supermarket in Boulder, Colo., while a gunman opened fire, killing 10 people. On Sunday, she ran the 5,000 at the USA Track & Field Golden Games and Distance Open in Walnut, Calif., in 15 minutes 25.81 seconds.

It was five seconds off the qualifying time for the trials, which take will place June 18-27 in Eugene, Ore. But it was Montoya’s best time in the event, and it marked another moment in which Montoya reclaimed a part of her life, moving toward what she hopes is a trip to the Tokyo Olympics.

“It honestly was 10 times better than I thought it was going to be,” Montoya said this week. “My goal was just to build a race, stay strong the whole race and whatever time happened, happened. Obviously, a [personal record] would be a bonus, but really just waiting and feeling like I was ready to race was the bonus.”

She already has qualified for the Olympic trials in the 10,000 and hopes to run both races. On Sunday, she had to push past both emotional hurdles and what she called “a nagging hip and hamstring issue.”

“In the past if I had a hip issue and stuff, I might have mentally and physically eased off, subconsciously but not obviously trying to slow down,” she said. “This time, it was a totally different feeling, seeing along the way that I was running fast and hearing a lot of people in the crowd cheering for me and yelling my name — even though I didn’t know anybody that was there, obviously — helped.”

After the race, Montoya, 26, said she felt “overwhelmed” but in a welcome, different way. “I sat down as soon as I crossed the finish line and was just kind of like, ‘Wow,’ ” she said. “Then the winner came over and gave me a high-five, and all the runners were really happy for me. Mostly, I was just in shock, I think, and overwhelmed, in a good sense. It was just a good overwhelming feeling.”

Montoya, who ran in college at Baylor, had worked as a pharmacy technician at King Soopers for about three years while she trained with Roots Running Project in Boulder and considered applying to medical school. The day after she finished seventh at the USA Track & Field 15-kilometer championships in Florida, she arrived for her shift shortly before the gunman opened fire.

Montoya momentarily considered running from the store before hiding with co-workers behind a metal door in a room behind the pharmacy. She phoned her parents in Rogers, Ark., and told them she loved them. She received text updates from her boyfriend, Jordan Carpenter, and from running coach Richard Hansen, a chiropractor with a nearby office.

A week after the shooting, Montoya shared the horror of the moment on Instagram, writing that she heard her manager yell “active shooter” and fled with co-workers to a counseling room. There, they heard the shots and incessant ringing of phones outside. There was more shock after police arrived and Montoya and her colleagues walked past blood on the floor and the body of a co-worker. “I tried not to see, but we did. We were horrified. We walked out of that building that day alive but will forever be scarred by the sight of a dead colleague,” she wrote of Rikki Olds.

Immediately after the shooting, Montoya spent a therapeutic week at home in Arkansas with her parents, David and Debbie Moubry-Montoya, and her boyfriend, then returned to Colorado for the 10k Run 4 Boulder Strong in honor of the 10 who died. When she later went to a track meet as a spectator to support friends in the competition, a companion reminded her of the sound of the starter’s pistol.

“One friend said, ‘Hey, the race is about to start,’ kind of warning me. It was very kind,” she recalled. ” … I don’t have too many issues with the starting guns themselves; it’s more just startling, loud noises — like people loading things into vehicles or if I heard something clang, like over like a hurdle. That was a little startling. The night before that meet, I was watching a show with my boyfriend, and I don’t know if it was like a car backfiring or someone setting off fireworks, but it was a rapid, rapid series of little shots, and that did not feel good. It’s more when there’s a sudden unexpected noise, when I don’t know what’s going to happen.”

Montoya hasn’t sought counseling and has relied on her network of family, friends, and staff and customers at the Boulder coffee shop where she works.

“Just having a lot of good people to talk to helps, but there are moments. Last week, I did an interview for Runner’s World magazine, and I didn’t have too many strong emotions at the moment, but the next day, just out of the blue, I had just a horrible day mentally, and I hadn’t really had that since a few days following the shooting,” she said. “Then I kind of felt like I was on a roller coaster — some things would set me off for a little bit more than they ever had before. But I was able to reel it in.

“When I have those moments, I just kind of sit outside, with my dog [Harper, a goldendoodle] with me, and let the emotions roll over me because it’s a better feeling than just trying to not process it. I know the best thing is to talk to someone about it, but at the moment for me, just letting the emotions fill me and just sit outside is what I do.”

Her recent birthday was a reminder that, although she felt as if she was taking “big, big steps forward,” recovery isn’t always linear. “I feel like that’s kind of what happens to a lot of people. You have like these big steps forward and then a few steps back. Obviously the race went really well, and I’m feeling good right now, but what those moments have made me realize is that they can kind of appear at any moment. Even if you think everything’s okay.”

Montoya next will run Saturday in a track meet in Los Angeles, competing in the 5,000 and hoping to lower her time to a trials-qualifying mark. Admittedly, her goals are lofty, with only the best three times at the trials qualifying for Team USA.

“The top three is deeper than it’s ever been, so it’s tough,” she said. “It’s going to be a hard team to make, but regardless, being able to be at my first Olympic trials is going to be a great experience. And if I can compete in two events, even better.”

The shooting left Montoya permanently changed yet still the same, an athlete balancing her mental and physical approach to competition.

I was just telling myself, ‘I know that this is going to hurt most likely,’ ” she said of her hip and hamstring issues at the start of Sunday’s race. “It was also me telling myself mostly, ‘You almost didn’t have this opportunity ever again.’ It was cheesy — like, ‘make the most of the opportunity.’ That was the talk I was having with myself because I knew I should be extremely happy that I was there racing.”