DOHA, Qatar (AP) — Spain coach Luis Enrique gave his team a unique assignment following a penalty shootout loss to Italy at last year's European Championship.

“I told my players they have homework ahead of the World Cup. You need to take at least 1,000 penalties with your club,” Luis Enrique recounted Monday. “We can’t just work on it in our training camp with the national team.”

While Spain is hoping it won’t come down to a shootout against Morocco in the round of 16 on Tuesday, at least the team is well prepared if it does get to that point.

Spain was also eliminated in a penalty shootout at the 2018 World Cup, by host Russia.

“It doesn’t just depend on luck. It’s a moment of the highest pressure. If you’ve trained for that often, then the way you take a penalty will improve,” Luis Enrique said. “Obviously you cannot train for the pressure and the tension. But it’s manageable. You can cope with that pressure.”

Ferran Torres converted a penalty for Spain in its opening 7-0 win over Costa Rica.

Spain goalkeeper Unai Simón saved two penalties in a shootout win over Switzerland before the loss to Italy at Euro 2020.

“The goalkeepers are ready, too. You’ve seen it in our training sessions,” Luis Enrique said through a translator. “It’s homework that we’ve taken into account.”

Morocco has been one of the biggest surprises of the tournament by winning a difficult group ahead of 2018 finalist Croatia and 2018 semifinalist Belgium.

Morocco conceded only one goal in its three group matches and the team has big support in Qatar as the last of the four Arab qualifiers still playing — and now the last African team, too, after Senegal was eliminated by England on Sunday.

“Everyone wants to come to Doha,” said Morocco coach Walid Regragui, who only took over his team in August. “We could fill two stadiums.”

As close neighbors, there are also a lot of ties between Morocco and Spain.

Morocco goalkeeper Yassine Bounou and striker Youssef En-Nesyri both play in Spain for Sevilla. Talented right back Achraf Hakimi, a Paris Saint-Germain player, was born in Madrid. Regragui played in Spain with Racing Santander.

Many of Morocco’s players speak Spanish and the team’s medical staff is Spanish.

“Morocco is a country for which we have a great relationship,” Luis Enrique said. “It’s a festival of football.”

Spain also met Morocco in the teams’ final group game in 2018, which ended 2-2.

“They play a possession game, which is very difficult for the opponent but also for people watching,” Regragui said. “Tak, tak, tak, tak, tak until the players are tired.”

For inspiration, Morocco is looking to Japan’s win over Spain in the final set of group games, when Japan had only 17% of the possession.

“We need to have a strong head. We need to accept that they’re going to play a possession game,” Regragui said. “Spain won’t know what to do with all that ball possession — that’s our plan.”

The winner will face either Portugal or Switzerland for a spot in the semifinals.