Bahamian Shaunae Miller launched herself over the finishing line with a desperate dive to pip Allyson Felix to the women's Olympic 400 metres gold medal by the narrowest of margins.

After flying across the line in a personal best time of 49.44 seconds, the 22-year-old lay prone on the track, shaken up and exhausted as she waited for the scoreboard to confirm she had clinched her first major title.

Felix, who finished in 49.51, also collapsed to the track after failing to win her fifth Olympic gold medal, let alone the 200-400 double she had originally planned in her fourth Olympics.

The 30-year-old Californian's silver medal was, though, her seventh in four Games, making her the most decorated American female track and field athlete at the Olympics by bettering Jackie Joyner-Kersee's tally of six.

Jamaica's Shericka Jackson took bronze in 49.85.

Second behind Felix at the world championships in Beijing last year when her strong finish was not enough to rein in the American, Miller had clearly learned her lesson.

She exploded out of the blocks in lane seven and went for broke, her long stride giving her a good lead on the back straight as the shorter Felix powered away inside her.

Miller retained her lead coming off the final bend but started tightening up as Felix surged about 50 metres from the line and the pair were neck-and-neck until the Bahamian's gold medal-winning dive.

Americans Natasha Hastings (50.34) and Phyllis Francis (50.41) finished fourth and fifth.

Felix was denied the chance to defend her 200m title, and bid for an unprecedented double, in Rio after failing to finish in the top three at the US trials while suffering the effects of an ankle injury she suffered in a gym accident.