What has been described as the nightmare scenario, the Video Assistant Referee and replay system used in a few soccer leagues around the world came true on Wednesday in MLS at Avaya Stadium.

And that nightmare may result in Atlanta United eventually achieving one of its dreams after rallying to win 4-3 at San Jose Wednesday.

In the 67th minute, Atlanta United’s Hector Villalba put in a cross that hit the arm of San Jose’s Magnus Eriksson. Referee Fotis Bazakos didn’t call a foul, allowing play to continue.

While Atlanta United’s players raised their arms to protest the non-call, San Jose raced down the field. Chris Wondolowski scored for the Earthquakes, giving them what they thought was a 4-1 lead.

Bazakos signaled that he wanted to look at a replay.

The original assumption was that Wondolowski may have been offside when the pass was made.

Instead of signalling for offside, Bazakos jogged to midfield, picked up the ball, and continued walking toward San Jose’s penalty box. As he walked, he signaled a handball penalty and pointed to the spot.

“For us, we thought it was a handball in real time,” Atlanta United manager Gerardo Martino said. “We could see from the bench that it was a clear handball when Tito crossed the ball so if the referee calls it the first time then they don’t have the opportunity to go down and score.”

Josef Martinez converted the penalty in the 70th minute.

San Jose’s supposed 4-1 lead was instead 3-2.

“It changes the game,” captain Michael Parkhurst said. “4-1 to 3-2 right away. It gives us momentum. As soon as that goes in, we get the feeling we’re destined to get at least a point out of this game.”

It’s believed to be the first time in MLS that a goal scored has been taken off the board, and another one put on as a result of a penalty because of a decision influenced by the Video Assistant Referee and replay system, which was instituted in late Aug. 2017.

Atlanta United went on to defeat San Jose on another Martinez goal in the fifth minute of stoppage time. The victory pushed the Five Stripes to a league-leading 60 points, four ahead of New York Red Bulls in the race for the Supporters’ Shield. Atlanta United’s players have said winning the Shield is a goal. It would be the team’s first trophy for on-field performance.

San Jose’s supporters were not happy, chanting at Bazakos as he walked off the field.

"We were protesting because it was a hand ball and I think we lost our concentration and they went out and scored," Atlanta United's Miguel Almiron said. "Thanks to God, there was justice on the play and it came back and turned into a goal."