RIO DE JANEIRO — Allyson Felix has had a tough summer clouded by an ankle injury and doubts. But she tried to put that behind her now.

As she and the rest of the field came slingshotting out of the last turn in the 400-meter final Monday and down the final straightaway, she turned on her sprinter’s speed and set out after the leader, Shaunae Miller of the Bahamas. As they approached the line the crowd was roaring as they went stride for stride — until Miller dove. And Felix didn’t.

It was a stunning, surprising end to a stirring stretch-run battle. The image of the photo finish showed Miller edging Felix, the most decorated woman in American track history, by half a body length — or a mere seven-hundredths of a second on the clock — with a winning time of 49.44 seconds to Felix’s 49.51. Shericka Jackson of Jamaica was third in 49.85.

Had the race been even 1 meter longer, Felix would’ve won. But that was no solace to her now.

“I was just focusing on myself,” Felix said when asked once, then twice, about Miller’s tactic of going headfirst for the line. But Felix refused to take issue with it or even answer if she ever considered diving to win a race. But Natasha Hastings and Phyllis Francis, her American teammates who finished just out of the medal running, said it wasn’t the first time they’d seen anyone go to the lengths Miller did to win.

“I did it myself twice this year,” Hastings said. “I dove [at the U.S. Olympic trials] for my spot here. And I did it in indoor nationals as well.

“You do what you’ve got to do to get over the line.”

Felix herself? She was expressionless right after the race. She just walked over to congratulate Miller, who had rolled over and was still lying on her back on the track when the scoreboard said it was official that she’d won. Felix and Jackson both tried to help Miller to her feet, but Miller was too overcome with emotion. She just kept lying there, staring at the night sky. She pulled off one shoe, then the other. She covered her face with both hands again as if she couldn’t believe she had won.

Felix finally sat down on the track too, riding out the pain and disappointment.

“I gave it everything I had,” she said when she finally came to the media area beneath the Olympic Stadium grandstand more than 40 minutes after the race. “It’s deeply disappointing. I’m a competitor.”

She was still teary eyed as she struggled to talk about what happened.

Felix had been in a race to get healthy enough to even make the U.S. team for Rio since mid-April, when she tore ligaments in her ankle during a medicine ball workout. She has been a sprint star since the age of 15 and ran the 100 and 200 at the London Games, winning gold in the latter. But a few years ago, she started to seriously embrace the idea of chasing the 200-400 double here instead — something she’d never done.

She said she believed she had “untapped potential” at the longer distance. Retired American track great Michael Johnson, the last man to pull off the 200-400 double at the Games, had urged her to try it too. Then in January, Felix’s coach, Bobby Kersee, petitioned the IAAF, the international governing body for track and field, to tweak the Rio schedule to be more accommodating to Felix’s attempt.

That the request was granted hinted at Felix’s stature in the sport. Her silver Monday gave her 20 career Olympic or world outdoor medals. Four of her seven Olympic medals are gold.

But Felix had the same hard luck at the U.S. Olympic trials last month that she had here in Rio, her fourth Games.

She missed qualifying for the U.S. team in her beloved 200 by one-hundredth of a second, an even more torturously close margin than she lost by to Miller.

Standing here now and thinking back on it all, Felix refused to even mention her injury. She refused to gripe about her bad luck or say her conditioning wasn’t what it would’ve otherwise been, either. This was her only individual race of these Games, and she had poured her heart into making it count.

“I just wanted to win it. I was hoping it would all come together tonight. It just wasn’t enough,” she said.

Then she second-guessed her race strategy.

“I think I should have been a bit more aggressive,” she suggested, alluding to how Miller ran a far stronger final curve than she did, leaving her so much ground to make up. “I might have let it get a little away from me.”

Then she choked up again and walked away.

She has been a sprint sensation since she was a teenager. She’s 30 now. She knows as well as anybody that infinitesimally small margins define this sport.

Seventh-hundredths of a second is nothing at all, really.

Just the sort of margin that can keep you up at night for years.