DOHA, Qatar (AP)The most controversial goal of the World Cup so far was scored by Japan, and it eliminated Germany.

The Japanese came from behind to beat Spain 2-1 on Thursday and advance to the round of 16 on a goal that many felt went out of play before the ball went into the net. The victory also meant that four-time champion Germany, playing at the same time, was knocked out of the competition in Qatar.

FIFA confirmed Friday that an overhead camera positioned along the goal line verified the ball stayed in play.

WHAT HAPPENED?

After trailing 1-0 at halftime, Japan substitute Ritsu Doan scored in the 48th minute. A draw wasn’t enough, though. They needed another goal.

Three minutes later, Japan was again swarming the Spain net as the ball rolled across the goalmouth. Two Japanese players slid trying to hook the ball back in front and Kaoru Mitoma succeeded.

Mitoma’s kick sent the ball down into the turf and bouncing up in a slow loop for the onrushing Ao Tanaka to guide into the net with his right knee.

WHAT IS THE RULE?

The soccer rule from the International Football Association Board related to the incident comes in ”Law 9: The Ball In and Out of Play.”

Section 9.1 states: ”The ball is out of play when it has wholly passed over the goal line or touchline on the ground or in the air.”

The entirety of the width, or circumference, of the ball has to cross the line to be out of play. It does not have to be touching the white line.

A field-level camera angle on Thursday showed green space between the line and the ball, making it look out of play.

”If it was not a goal I would not have been disappointed,” Tanaka said.

VIDEO REVIEW

World Cup match officials get the benefit of 42 broadcast cameras to review all plays during the 64 games in Qatar, ”eight of which are super slow motion and four of which are ultra slow motion,” FIFA said.

The VAR technology has been in use since the 2018 World Cup in Russia.

The VAR team includes four officials who review all plays in front of a bank of screens. They alert the on-field referee to ”clear and obvious errors” and missed incidents in ”match-changing” events.

They are not allowed to intervene for every potential infringement of the rules – only the ones that relate to goals, potential penalties, red cards and cases of mistaken identity in the awarding of yellow and red cards.

Every goal at the World Cup is reviewed to ensure the build-up play is valid.

It took more than two minutes on Thursday for the VAR team to confirm the Japan goal was good.

OTHER SPORTS

Other sports have different ways to decide if the ball in in play.

In tennis, the camera-based Hawk-Eye system verifies if any part of the ball was touching the line and therefore inbounds.

In basketball, a player can keep the ball in play as long as no part of the player’s body is touching the ground outside the court.

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