Iraq defeated Qatar 2-1 in the Asian Football Confederation's U23 Championship to secure a spot in the 2016 Olympics in Rio de Janeiro, the fifth time the Iraqi team has qualified.
For Iraqis, that victory was an escape, however brief, from the many problems they face.
"Nothing brings joy to Iraq except the athletes," said Yasir al-Saffar, who owns a small shop in Baghdad.
"Thank you for the joy you have brought to us all," Saffar said of the football team, adding that it is "the opposite of the politicians, who bring worry and sadness".
After Iraq's win over Qatar with a header in extra time on Friday, Saffar "went out to dance and celebrate with the people in the streets", he said.
He joined thousands of other Iraqis who honked horns, waved flags out of car windows and sent fireworks shooting into the sky for several hours in the Iraqi capital.
The Iraqi team returned home Saturday to a raucous welcome of cheering, drums, horns, whistling and waving of flags at Baghdad airport.
The national football team's success is a cause for celebration in a country that has had long years with little to celebrate.
Millions of Iraqis have been displaced by violence, bombings in Baghdad and elsewhere are common, the Islamic State group still holds significant territory, and areas recaptured from the jihadists have been devastated by the fighting.
'A great night'
Signup to our newsletter and follow us on Facebook and Twitter!
There are also sharp divisions between various religious and ethnic communities that frequently lead to bloodshed, and many Iraqis have lost faith in their country.
Their outlook is not helped by politicians, who often seem more concerned with political squabbling and self-enrichment.
As a result, Iraqis need something positive to rally around, something that serves as a source of national pride.
That something is football.
"That night, we forgot all the corruption and politics and suffering. It was a great night in every sense of the word," said Ali al-Samarrai, who works in computer repairs.
"The young athletes united the nation, and the old politicians divided the nation," Samarrai said.
The Iraqi football team has made four previous appearances at the Olympics: Moscow in 1980, Los Angeles in 1984, Seoul in 1988 and Athens in 2004.
But the 2007 Asian Cup was perhaps the best example of the unifying power of football in Iraq.
That year, at the height of brutal Sunni-Shiite sectarian violence, Iraqis came together to cheer on the national side and turned out to celebrate their team's victory in the tournament.
"The Iraqi Olympic team put a big smile on the faces of tired Iraqis," journalist Ziad al-Shammari wrote on Facebook after the victory over Qatar.
"Their governments haven't done that in 12 years," Shammari said.