DOHA, Qatar (AP) — When the World Cup draw came out in April, one of the highlights of the group stage was Sunday’s match between Spain and Germany at Al Bayt Stadium.

Nearly eight months later, the game between the two former world champions and pre-tournament favorites gained even more prominence thanks to Germany’s surprising loss to Japan in its opener in Qatar.

Another setback against Spain this weekend and Germany may be heading home early for the second straight World Cup. A loss — coupled with at least a draw by Japan against Costa Rica in the earlier match Sunday — will mean elimination for the four-time champions.

“We are optimistic,” Germany coach Hansi Flick said Saturday. “We have to be brave and believe in our quality. We want to stick to our game because we have the quality.”

Spain, meanwhile, will be looking to secure its spot in the next stage and reinforce its status as one of the top title contenders following an impressive 7-0 rout of Costa Rica in its opener.

“It’s a big test for us,” Spain coach Luis Enrique said. “In such an important event like this, against one of the favorites to win the World Cup, in a complicated situation for them, we want to show that we will not play differently, and that we will try to dominate from the start. And if it works, fantastic. If not, we will congratulate our rival.”

The signs aren’t encouraging for Germany. Its most recent match against Spain was an embarrassing 6-0 defeat in the Nations League two years ago. Its last win against “La Roja” came in a friendly eight years ago.

Germany won its fourth World Cup title in 2014 in Brazil, but didn’t make it out of the group stage in 2018 after losses to South Korea and Mexico. It would be the first time it fails to advance past the group stage in back-to-back tournaments.

Spain won its lone World Cup in 2010 in South Africa and was eliminated in the round of 16 in 2018 in Russia. A win against Germany will allow Spain to reach the last 16 if Costa Rica doesn’t defeat Japan.

Expectations around Spain’s young squad were raised after its outstanding performance against Costa Rica, when the team reintroduced “tiki-taka” ball-possession style and 18-year-old Gavi became the youngest World Cup scorer since Pelé in 1958.

The seven goals it scored against Costa Rica matched Spain’s tournament total from Russia in 2018.

Luis Enrique said the objective against Germany — which he said is the team that most resembles Spain — will be to control ball possession again.

“We need to have the ball more than they do,” he said. “If we can do that, certainly we will be in better position. If not, we are going to find ourselves in situations in which we will suffer.”

Luis Enrique said he planned to make changes to the starting lineup for Sunday’s match, and that he wasn’t concerned with his young players being overly confident.

“Against a team like Germany, we can’t be overconfident. Otherwise, they will trounce you,” Luis Enrique said. “It’s a rival that requires all of our attention and effort. It’s a great challenge for us.”

Winger Leroy Sané could return for Germany after missing the match against Japan because of a knee injury. He was back in training on Friday, when Flick was able to work with his full 26-player squad.

Flick went to the press conference by himself, without taking a player along with him as required by FIFA, saying he wanted the entire squad focused on their preparations at the team’s training camp, which is located outside Doha.

It will be the fifth meeting between the powerhouses at World Cups, with Spain winning the most recent one 1-0 in the semifinals of the 2010 tournament.

Spain hasn’t lost to Germany in official competitions since the 1988 European Championship, with two draws and three wins since then.

The Germans have lost three of their last four World Cup matches dating to the tournament in Russia.

They made headlines even before kickoff against Japan by covering their mouths to protest FIFA’s clampdown on the “One Love” armbands. It wasn’t clear if they would repeat the gesture before the Spain match.

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

Tales Azzoni on Twitter: http://twitter.com/tazzoni