Aly Raisman gets a hug from gold medal winner Gabby Douglas during the all-around competition. (Julie Jacobson/Associated Press)

When the final scores were tallied in the women’s gymnastics all-around competition, American Aly Raisman and Russian Aliya Mustafina were tied with the third-highest overall scores of 59.566. But Mustafina was awarded the bronze medal and Raisman finished fourth. Why?

According to International Gymnastics Federation procedures, in the case of a tie, the lowest apparatus score is dropped and the remaining scores are added together. In that case, Mustafina finished .567 ahead of Raisman:

Mustafina: 15.233 (vault) + 16.100 (bars) + 13.633 (beam) + 14.600 (floor) = 45.933

Raisman: 15.900 (vault) + 14.33 (bars) + 14.2 (beam) + 15.133 (floor) = 45.366

“I’m trying to be positive about it,” Raisman told reporters in the mixed zone, according to a quote sheet. “They said that they took out the lowest score and added the rest and she had the highest score. No one told me that, I found out from one of the media people. …

“Of course it’s a huge bummer but I’m still fourth in the world so that’s something to be proud of. It’s also a bummer that they can’t just let us both get a bronze medal but I’m happy for the girls that are on the podium.”

Gymnastics used to award duplicate medals in the case of a tie at the Olympics, but the International Olympic Committee put an end to that following the 1996 Atlanta Games. However, the gymnastics federation simplified its tiebreak formulas in June, which could allow for shared medals in rare cases.

Here’s a good explanation of the scoring system in gymnastics.