BAGHDAD — The protesters massed and shouted against Iran again on Thursday in Baghdad’s Tahrir Square and elsewhere, much as they have done over the past six weeks. But this time they were shouting with euphoria.

Their national soccer team outscored Iran 2-1 in a World Cup qualifying match.

The police, who in other circumstances might be looking tense, joined in the celebrations, as did Iraq’s senior leaders. Prime Minister Adil Abdul Mehdi even ordered giant screens erected in main squares around the country so Iraqis could watch the game, televised live from neighboring Jordan.

“All Iraqis are waiting for you to produce amazing results and support your efforts to win and bring joy to the hearts of all Iraqis,” Mr. Mehdi told the head of Iraq’s soccer association before the game.

Regardless of how Iraqi politicians view Iran, when it comes to soccer, they are 100 percent pro-Iraq.