DOHA, Qatar (AP) — From most angles, it looked like the ball went out of play just before Japan scored its winning goal in the 2-1 victory against Spain in the World Cup.

Associated Press photographer Petr David Josek took a photo from above that appears to support the referee’s decision to allow it.

Josek’s image was taken Thursday night from a narrow catwalk, high above the field at the Khalifa International Stadium. A catwalk is an elevated platform just under a stadium’s roof that allows a small group of photographers to shoot a game from above.

With Spain up 1-0 at halftime, Josek stayed where he was in the second half, rather than moving to the other end in anticipation of another goal from the 2010 World Cup champions.

“I decided to stay because obviously if Japan can turn things around, it’s a bigger story,” Josek said. “I’m happy about that decision.”

It meant Josek had a perfect vantage point for the image that defined Japan’s comeback. Many people watching the game – including the referee’s assistant – thought the ball went out of play just before Kaoru Mitoma sent a cross to Ao Tanaka for what proved to be the winning goal from close range.

Under the rules of soccer, all of the ball needs to have crossed the line to be out of play, which can be difficult to establish in some situations. Video review officials needed about two minutes to confirm the whole ball hadn’t gone out of bounds. It was a millimeter decision.

“When I saw it, I was like, ‘Oh God, I’m pretty lucky.’ That was the exact point of where the ball was coming back,” Josek said. “I was pretty lucky to get it at that exact moment.”

Normally based in Prague, Josek is among AP’s team of photographers covering World Cup games in Qatar from multiple positions. On the catwalk, Josek had to wear a harness and a helmet, while all his cameras and equipment – weighing around 12 kilograms (26 pounds) in total – had to be secured, too, to avoid any of it falling and injuring the players below.

”You have a strap with a big hook that you just kind of hook yourself onto in case you were to fall. It catches you from falling,” Josek said. “It’s physically demanding. You have to hand-hold a (large) 400-millimeter lens because you can’t use a monopod. And you’re doing that for two hours standing on an uneven surface.”

___

AP World Cup coverage: https://apnews.com/hub/world-cup and https://twitter.com/AP_Sports