This week marked the 36th anniversary of the "Miracle on Ice," when the United States men's hockey team shocked the Soviet Union and two days later, won the gold medal. But it almost ended in disaster for the Americans, who still could have coughed up gold to the reigning champs.

Had the United States lost to Finland on Feb. 24, 1980, the Soviet Union — yes, the same Soviets the U.S. defeated in the "Miracle on Ice" game two days prior — would have won the gold medal.

That's because in 1980, the Olympic men's hockey medal round was played in a round-robin, not single-elimination, format. Finland and the United States would have played regardless of the result two days earlier. But the U.S. still needed that 4-2 win over the Finns to win the gold medal, and they may not have won a medal at all with a loss.

MORE: Best sports movies ever | Who got snubbed from 2014 Olympic rosters?

Here's how the tournament worked.

— Twelve teams were divided into two groups of six. Each team played five games in pool play and received two points for a win and one for a tie. The top two teams in each pool advanced to the medal round — Sweden and the United States out of the Blue Division, the Soviet Union and Finland out of the Red Division.

— The outcome from a pool-play matchup between the two advancing teams carried over to the medal round. The U.S. and Sweden tied, giving them one point each. The Soviets beat Finland 4-2. So before the medal round even started, the standings were:

Soviet Union 2

Sweden 1

United States 1

Finland 0

— Each team then played the two advancing teams from the other bracket, no matter what. So while it's commonly believed that the "Miracle on Ice" game was the semifinal, it technically held the same weight as the United States' next game against Finland. After the U.S. beat the Soviets and Finland tied Sweden, the standings were:

United States 3

Soviet Union 2

Sweden 2

Finland 1

MORE: The most patriotic names in sports

— Again, no matter the result of the Americans' game against the Soviets, they would have played Finland. Had they lost or tied, things would have gotten interesting. A Finland victory would have given each team three points. The Soviet Union beat Sweden 9-2 several hours later, giving it four points and the gold medal had Finland won. A U.S. tie would have given it four, but it would have been well behind the Red Army in goal differential.

Had Finland beat the U.S. by at least two goals and Sweden and the Soviet Union tied, the Americans would not have medaled at all.

The final standings:

United States 5

Soviet Union 4

Sweden 2

Finland 1

This is never mentioned in Miracle. Had the United States not climbed out of a 2-1 hole entering the third period of that game against Finland 36 years ago, it not only would have lost the gold medal, but let the Soviet Union win its fifth straight.