SOMETIMES the head gets it right, when the heart leads you astray with hope.
This was always going to be the trickiest game, against the world and European champions. The manner of the Croatia defeat dented fans' confidence, but they still dared to hope.
The hopes are gone, all that remains now is a dead-rubber game against Italy.
In the last few days, supporters convinced themselves against their better judgement that a result against Spain was possible.
It snowballed as kick-off approached, and a banner unfurled in Gdansk yesterday read: "Miracles Do Happen". Word from home was that belief was there too.
"A draw and we'd be ecstatic," said Diarmuid McRory from Longford before the game, in Gdansk with friends Shaun Cunningham, James Fitzgerald and Paddy O'Connor.
Fans prayed for a result. They knew they'd need help from the higher power to get anything out of last night.
Helen Graham and her friend Lynne D'Arcy prayed to St Jude yesterday morning for a win. Austin Nolan (65) -- originally from Inchicore but living in Reading -- went to the church of St Anthony beside his Gdansk hotel and got on his knees too.
Tickets were scarce, with Polish locals taking up a large share of seats in the stadium. It only became clear how many when they rose to their feet to chant on their own team.
Two of them -- Mateusz Gliwicke and his girlfriend Marta Mercik -- predicted a 4-0 Spanish victory. How right they were.
Fans walked around with "tickets needed" signs around their necks. The going rate for a €30 ticket was €200. Many paid it, just to see what could be the Miracle of Gdansk.
And fans were up for it. The sing-along to 'The Rocky Road to Poland' before the match was pumping. The national anthem was sang with the stirring gusto that only comes when everyone knows it is all on the line.
"It's now or never -- this is it," said Ryan McGrath (36) from Greystones.
"My head says 3-0 to Spain, my heart says 1-0 to Ireland," said David Byrne (48) from Bray. People saw Fernando Torres -- who had a poor season with Chelsea -- start, and took heart.
The Irish comfortably outnumbered and outsang the Spanish. But reality stuck cruel and quick, with a Torres goal in the fourth minute. Spain began their slick possession game, rarely giving Ireland a glimpse of the ball.
A second from David Silva just after half-time sealed it. Torres got another and the rout finished at four.
Shocking, brutal, terrible -- words that all fell from supporters' mouths. "I'm thinking about heading back, I'm not sure about staying for Italy," said Lee Redmond (33), originally from Wicklow but who flew from his new home in Australia for the tournament.
Martin Donnelly from Derry said it was the "worst Ireland team" he's he ever seem.
"There was no fight in them at all," he said.
Others promised to make the most of the next few days regardless.
However, there was no disguising the deflation as it dawned that this was the end of Euro 2012 for Ireland.
But still they chanted until the end, and after it, of the dreams they had and songs they had to sing.
The dreams are gone, but the singing will have to last until the last campervan leaves Poland.