Costa Rican president Luis Guillermo Solís sent a tweet just before kickoff of his country's World Cup match against Italy on Friday afternoon, predicting a victory and the scoreline.

Then Costa Rica captain Bryan Ruiz broke a scoreless tie in the 44th minute.

And Solís turned up.

After the final whistle — with Costa Rica through to the knockout stage for the first time since 1990 — Solís couldn't resist pointing out his prediction: "I told you, 1-0."

But it didn't end there. The president invited fans to meet him at Fuente de La Hispanidad for a celebration — before running there himself.

Solís greeted fans from a bridge overlooking the roundabout, where people had gathered to watch the match on giant screens. Government employees had been given the day off, so the turnout did not disappoint.

Costa Rica entered the World Cup as a longshot to advance out of a group with Uruguay, Italy and England — three nations with seven World Cups among them.

But Los Ticos won 3-1 over Uruguay on Sunday and followed it up with Friday's historic upset of the Italians, which puts them in first place of Group D with six points and ensures their progress to the knockout stage.

It's just the fourth ever World Cup appearance for Costa Rica, though the tiny Central American nation did famously make it out of the group stage as debutants in 1990 — a team whose legend Ruiz hopes to eclipse.

The crowd only grew after the match, with many schools closing early to allow children to join in the celebration.

Costa Rica's next game is Tuesday against England, who was mathematically eliminated from the tournament with Friday's result.