Time sometimes slows down for athletes locked in fierce competition, and so it was for Liam Purdy as he battled his shoe Sunday afternoon.

The American University junior had planned on winning the Patriot League 800-meter indoor title. About halfway through the race, his shoe decided it had other plans, and began to vacate Purdy’s foot. And as he shed the footwear and plotted the rest of his race, time slowed enough for Purdy to have a flash of insight.

“I couldn’t help but think this is going to be one remarkable story,” the middle-distance runner said this week. “I was like, ‘Let’s make that happen.’ ”

He did, despite his balky sneaker, which DNF’d. Purdy and his lone remaining shoe won the race. He bled his way off the track. And when the Eagles’ traveling party walked through the airport a few hours later, set to fly home from Boston to D.C., American assistant Chris Kwiatkowski tapped Purdy on the shoulder and pointed to the television in a nearby sports bar.

“And there I am, running on the track, on TV,” Purdy said, still stunned. “It blew my mind. It’s weird enough to see track and field on TV, let alone myself. So I kind of ran into the bar and stood there in the middle. Like, ‘Oh look. It’s me.’ ”

This story actually began Saturday, when Purdy ran the anchor leg for American’s 4×800 team. He ran a time of about 1:50, the fastest 800 meters of his life and a time that would put him in contention for Sunday’s 800-meter final.

“When that gun goes off, you stay loose, and this will be your race,” American Coach Matt Centrowitz promised him. Purdy agreed. He was seeded third in the 800, but he had been telling himself all week that it was his time to win, and his performance Saturday made him sure of it. Before the race began, he triple-knotted his shoes, just to be sure.

“Unfortunately, there were other plans in store,” he said.

Near the race’s midway point, Purdy sat behind the higher-seeded runner from Army, exactly where he wanted to be. Around then, a trailing runner curved behind Purdy to fall in line on the turn, accidentally stepping on his heel. The back of the shoe flew off and tucked underneath his foot, turning it into a glorified flip-flop — something that had never happened in his track career. His heel wasn’t going back inside. For the next three or so strides, Purdy tried to flick his right foot backward as he ran. Finally the shoe popped off.

Centrowitz has an expression that he beats into his runners from the moment they arrive on campus: “The mind leads the body.” As Purdy tried to figure out what to do next, that motto kicked in.

“Obviously you don’t train for your shoe falling off,” he said. “No one’s training for that. But you do train for complicated situations: adversity, things not going according to plan. As soon as my heel came out, I realized, ‘This is going to compromise my race; I need to drop this shoe now.’ And then from there on out, mind led the body. I told myself, ‘This is not going to affect your race. You’re going to win.’ And that just gave me more power.”

Now, Purdy had always heard runners say you should never experiment barefoot on a track, that it will tear up your feet, causing great pain and danger. Among the things flickering through his mind during those final 400 meters: Maybe all those people were wrong!

“I remember thinking to myself, ‘Wow, I don’t feel any pain at all!’ ” he said. “‘I’m gonna get out of this scot free! I am ok!’ I didn’t feel anything.”

So Purdy made his move down the backstretch, gliding into first. He grimaced his way around the final turn. “Purdy has lost his sneaker, and he’s still charging with a bare right foot!” the announcer hollered. He held off Boston University’s Ethan Homan, the event’s defending champion, who tried to make a move on the outside.

“Liam Purdy has the lead, and he wins barefoot!” the announcer yelled as Purdy came across the line, first by less than a tenth of a second. And Purdy not only won; he set a personal record with a time of 1:53.25, third fastest in school history. (The relay time from the day before wasn’t officially counted as a PR.)

High on adrenaline and one-shoed victory, Purdy kept running past the finish line. It took him a while even to think to look down at his bare foot. Then he noticed about two inches of skin peeling off underneath his little toe.

“A lot of hobbling and a lot of walking on the inside of my foot from there, trying not to trail blood all over,” he joked. “But what I really took out of it was that I need to fix my form up a bit. I seemed to be favoring one side.”

He made it to the medal stand to accept his win, where organizers called for a trainer, saying, “We’ve got a winner that’s bleeding all over the podium.” That ended Purdy’s meet, and American’s distance medley relay team couldn’t compete either, not without its 800-meter runner, whose foot was bandaged. (“Just like an extreme rug burn, if you will,” he said of the wound.) Meanwhile, American freshman Chandler Ross — which is a great name for the generic Friend in this story — kept telling Purdy he was going to be on ESPN.

“I just kind of rolled my eyes,” Purdy said. “And about 20 minutes later he slides me his phone, and it’s been picked up by SportsCenter.”

Since then, he’s been properly enjoying his viral moment. He set a PR without a shoe, after all, so Purdy joked that he’s hoping to start a new trend of one-shoed running. (“Millennials are pretty influential, he noted.) He isn’t sure about the proper encore; “maybe I’ll have to go on my hands next time,” he suggested. And asked whether he would do anything differently, he had an easy answer: “Maybe quadruple-tie my shoes.” But he did offer a bit of earnestness when asked about that half-barefoot final lap.

“The shoe came off, and it kind of reinforced that competitive drive,” he said. “I could have easily said, ‘Well there goes my shot, there’s always next year, there’s always the outdoor season.’ But no. I wasn’t going to let that happen. You know, that was my time. And I don’t regret it. The damage was definitely worth it.”