TOKYO — On Friday night at Olympic Stadium, a quartet of Americans worried for several hours that a simple and egregious mistake may have cost them and their fabled teammate a potential gold medal. Somebody, they believed, told somebody else to stand in the wrong spot.

The United States appealed its disqualification from the first round of the first-ever 4x400 mixed relay, a heat it otherwise won easily. Not long after Friday night had become the wee hours of Saturday morning, the sprinters learned they had won their appeal and been reinstated to the final Saturday night — a race that could feasibly net Allyson Felix a historic gold medal.

The four sprinters won their case, which given the stakes and preparation involved in the Olympics bordered on preposterous: a race official lined up Lynna Irby, who ran the second leg, on the wrong spot on the track, Irby’s personal coach Lance Brauman said in a text message.

As first leg Elija Godwin sprinted to the takeover zone, it became clear something had gone haywire. Godwin passed the second leg of every other team before he arrived at Irby, who had stationed herself about 40 meters further up the track than the other second-leg runners.

After the Americans won the heat, race officials disqualified the Americans, saying they had committed a zone violation and broken Rule 24.19, which reads: “For all takeovers, athletes are not permitted to begin running outside their takeover zones, and shall start within the zone.”

“It was a complete surprise to all of us,” Godwin, who handed Irby the baton, said before the reinstatement. “We heard the news. All we can do is prepare for the future, see what happens next.”

The ruling dredged up the U.S. relay history of dropped batons and botched handoffs. But according to Irby’s coach, this was in no way another American relay flub. Irby only started her lap outside of her zone because someone had instructed her to stand there.

“The official is supposed to line up the relay athlete up on the correct zone,” Brauman said. “They didn’t do that, which is the mistake of the officials. … It wasn’t her fault that they made the mistake, and she ran very well.”

The error led to nervous moments. Irby said nothing in a mixed zone interviews as her three teammates answered questions. “We’re just still waiting an official review for right now,” third leg Taylor Manson said shortly after the race.

It’s not clear yet, but the ruling may have had major ramifications on American track record books. Felix, a legend at her fifth Olympics, is a member of the mixed relay pool. If she runs for the Americans in the final, she and her three teammates will be heavily favored to win her 10th Olympic medal. The total — which she could still reach or pass in the women’s 4x400 relay or the 400 meters, too — would tie her with Carl Lewis for most in U.S. track and field history.

The race was supposed to make a different kind of history. The mixed relay was contested for the first time at the Olympics, in line with the Tokyo Games’s stated mission of gender equity. The U.S. foursome of Godwin, Irby, Manson and Bryce Deadmon won the first-round heat easily before the disqualification.

“For me it’s racing as normal,” Godwin said. “It is fun to see when people put their guys against the females and we got to go chase them down. It’s fun. And it’s a very new experience. I was glad to be a part of it.”

When Manson handed Deadmon the baton, the United States trailed Nigeria by about 100 meters, owing to the Nigerians’ unusual strategy. Unlike every other team, they had one of their men run the third leg and one of their women, Patience Okon George, run the anchor. Deadmon inherited a massive deficit, but he had to make it up against a member of the opposite gender.

“You never know what anyone has when they step on the track,” Deadmon said. “The only thing I can do is try to run my race and try my best and see what happens from there.”

Deadmon passed Okon George by the final turn, then cruised across the finish. Every other anchor runner, all of them men, passed Okon George, too, but she still enjoyed her role — and she believes she set a personal best for one lap trying to hold off the men.

“I need to go! I need to go!” Okon George said. “That is what I thought.”

The four U.S. sprinters huddled together and celebrated a novel victory, only for it to unravel, if only temporarily, in the oddest of ways.

“Mistakes happen,” Godwin said. “We are human. We do make mistakes. If at the end of the day we get DQ’d, I know I’m going to hold my head up high because I know we went out and we competed our best. And I’m proud of all of our guys and girls.”