When the Soviet Union broke up in the early 1990s and 15 new nations were formed, it was naturally a time of extreme change for the newly-liberated republics that stemmed from the collapse of the old USSR. In football terms, a strong Soviet team gave way to a decent yet flaky Russia side, a competitive Ukraine team backboned by a formidable Dynamo Kiev outfit, and 13 other nations who struggled to make any initial impact. Russia made it to a couple of tournaments in the mid-1990s but failed to impress, a sign of things to come, while Ukraine twice came close to reaching the big stage at the start of the 21st century. The other ex-Soviet nations had to make do with occasional moments of relative triumph, most notably Georgia’s 5-0 thrashing of Wales in the Euro 1996 qualifiers. Among the ex-Soviet nations who took time to acclimatise to their new surroundings were Latvia.

The maroon-clad team were an afterthought on the European stage and they briefly became the laughing stock of the continent when, in 2001, they were held 1-1 at home by San Marino in a World Cup qualifier, a result which remains the only competitive away match not to end in defeat for the Sammarinese. Things didn’t promise to get any better later that year when, in the draw for Euro 2004 qualifying, they were in a group alongside Poland and Sweden, both of whom were thriving, as well as Hungary and their friends from San Marino.

Unsurprisingly, Latvia’s squad was not awash with household names. Their highest-profile player in the early 2000s was striker Marian Pahars, who became a Southampton hero after his goals kept them up on the final day of the Premier League in 1999, while Igors Stepanovs was signed by Arsenal at a time when the Gunners were consistently finishing in the top two. Goalkeeper Alexander Kolinko had a somewhat less cerebral time in England, his three-year stint at Crystal Palace best remembered for him being punched in the face by Trevor Francis when the Eagles’ manager spotted him laughing on the substitutes’ bench after his team conceded a goal. Another to try his luck on English shores was midfielder Vitalijs Astafjevs, who was signed for Bristol Rovers by Ian Holloway during the 1999/2000 season.

The team was managed by Aleksandrs Starkovs, regarded as one of the greatest ever players to come from Latvia and a serial winner of the country’s domestic league with Skonto Riga, who gave a good show against Chelsea in a Champions League qualifier in 1999. When he was appointed to the national team job in 2001, his first of three stints in charge, he simultaneously held the Skonto Riga post, a rare case of double-jobbing in 21st century football. The challenge he faced to revitalise Latvia after the disastrous reign of Gary Johnson, whose stint was bookended by jobs at Kettering Town and Yeovil Town, was a formidable one.

Their Euro 2004 qualifying campaign began with a very solid result, holding Sweden to a goalless draw in Riga less than three months after the Swedes made it to the last 16 of the World Cup in Japan and South Korea. An even better result followed five weeks later when they shocked Poland to win 1-0 in Warsaw, the hosts suffering a horrendous post-World Cup hangover after an abject showing in the Far East. Latvia then travelled to San Marino in high spirits, but it took a last minute own goal from the group’s whipping boys to prevent the Latvians from drawing with UEFA’s lowest-ranked nation for the second time in 20 months. After that firm warning, they took no chances in the reverse fixture, easing to a 3-0 win and leaving themselves with a good chance of a play-off berth at the midway point of the group.

Just as the dream seemed attainable, though, Latvia’s next two games saw them encounter major setbacks. They fell to a 3-1 defeat in Hungary despite taking the lead and then lost to Poland, whose victory left them the team most likely to take the play-off spot. Then came another twist as Latvia exacted revenge over Hungary while the Poles lost to Sweden, who booked qualification as a result. The group winners’ final game, which was meaningless to them, was at home to Latvia, who had a three-point lead over Poland going into the final matchday.

A solitary goal from Maris Verpakovskis, who was fast emerging as Latvia’s key player with decisive goals at the tail end of the campaign, gave them victory against a Swedish side operating in second gear and took Latvia into a first-ever qualification play-off. The draw wasn’t kind to them, however – their opponents would be Turkey, who had finished third at the World Cup just a year earlier. Also, with the second leg away, the Latvians would almost certainly need to win the home leg and keep a clean sheet to have a good chance of making the finals.

The first leg took place on a bitterly cold November night at Riga’s Skonto Stadium, the home fans hoping that the tie would at least be alive for the reverse fixture in Turkey. It was Latvia who made the brighter start and it was they who made the first incision just before the half-hour, Verpakovskis maintaining his superb form with a close-range finish to give the underdogs a deserved lead. Indeed, Starkovs’ side had chances to extend their lead, with the Turks rapidly losing their heads. The visitors had been edging their way back into the contest in the second half before Emre Asik was sent off, although there was a late scare for Latvia when Emre Belozoglu’s header struck the post. The home side held out for a famous 1-0 victory and denied the Turks an away goal. Also, Turkey would be without three key players for the second leg due to suspension.

Four days later, the teams locked horns again at the Inonu Stadium in Istanbul. The home fans expected a reaction from their side after the shock defeat in Riga and they levelled the tie in the 20th minute through Ilhan Mansiz, one of the revelations of the 2002 World Cup. Latvia grew into the game after that setback and threatened an equaliser before falling behind on aggregate on 64 minutes when Hakan Sukur netted. Was their European dream dying as the tide turned towards the Turks?

The answer came straight from the restart after Sukur’s goal. Latvia won a free kick on the left and Yuri Laizans took responsibility for its delivery. The ball evaded everyone in the box, including the Turkish goalkeeper, and crept into the net. Latvia still trailed 2-1 on the night but now edged the tie on away goals. Turkey went straight downfield and hit the crossbar as they sought an equally quick response. The final goal of the game arrived on 78 minutes, when a long ball was punted up-field towards Verpakovskis, who shrugged off his marker before chipping the keeper to make it 2-2 and put the tie out of sight.

Latvia had done it. Only two and a half years after failing to beat San Marino at home, they were going to the European Championships and had dumped out the bronze medallists from the previous year’s World Cup. It was a result that sent shock-waves throughout football and, with Wales, Norway, Slovenia and Scotland all threatening play-off upsets before succumbing to the bookies’ favourites, Latvia would have sole billing as the neutral’s romantic choice at Euro 2004.

They would need to make full use of the underdog tag again after the draw for the finals was made just a few weeks after their version of the Miracle of Istanbul. They were pitted in Group D with Germany, runners-up at the 2002 World Cup, a Czech Republic team in its prime and a resurgent Netherlands side who were firmly on the rebound after missing out on the World Cup a couple of years earlier. The challenge that awaited Latvia was daunting, but they would have the benefit of travelling to Portugal with zero expectations. Unless they were mutilated in every game, they would go home as moral champions.

Latvia might have been playing in a major competition for the first time ever but one trait their team certainly didn’t lack was experience. At 24, Verpakovskis was the youngest member of the squad, his play-off heroics earning him a prestigious move to Dynamo Kiev in January 2004. Nine of their 23 players were 30 or over, with seven more either 28 or 29. Latvia’s was a side who had grown up together. Captain Mihails Zemlinskis, already a centurion coming into the tournament, had played in the country’s first international following independence in 1992, with Astafjevs and Oleg Blagonadezdins making their debuts that year as well. They also had the player who travelled unquestionably the furthest distance out of the 368 who were selected for Euro 2004. Midfielder Jurgis Pucinskis played in a UEFA league, but his club was Luch-Energia Vladivostok, who were based so easterly within Russia that, had Latvia made it to the 2002 World Cup, he’d have had a much shorter trip to Japan and South Korea.

Their first match at a major tournament pitted them against Czech Republic, a highly-rated outfit captained by the legendary Pavel Nedved and boasting a potent scoring threat in Milan Baros, experienced campaigners in Vladimir Smicer and Karel Poborsky, along with young Chelsea-bound goalkeeper Petr Cech. All the pre-match predictions followed the theme of how many the Czechs would score in Aveiro.

Latvia nearly fell behind in the opening minute, Nedved’s cross almost finding the roof of Kolinko’s net, and the Juventus maestro was bossing the game. Stepanovs might not have been much of a success at Arsenal but he was having a stormer for his nation here, constantly putting his body on the line as the Czech bombardment continued. Just before half-time came the sting in the tail and it was Stepanovs who instigated it. His pass out wide found Andrijs Prohorenkovs, who surged forward before picking out Verpakovskis in the penalty area. The striker had a simple finish to give Latvia a sensational lead against the run of play just as the referee was set to blow the half-time whistle.

Thoughts flashed back to Senegal’s defeat of holders France in their first match at the World Cup; could Latvia pull off a similar feat on their major tournament bow? The onslaught towards Kolinko’s goalmouth continued but Baros was having an off-day, spurning two glorious chances to equalise. The Liverpool man would eventually find the net, though, after the Latvian keeper flapped at a 72nd-minute Poborsky cross to give Baros an easy finish. It was a gift of a goal for the finals debutantes to give away, but a draw would still have been a fine result to claim from their first match at this level. Unfortunately that also eluded them, with the Czechs winning it in the final five minutes through impact substitute Marek Heinz after a scuffed clearance from the loyal and experienced Zemlinskis. On the balance of play, it was a fair result, but it was a cruel lesson in big-game management for a Latvian side who performed heroically.

It didn’t promise to get any easier as, four days later, Germany lay in store at the Estadio do Bessa in Porto. Admittedly it was far from the strongest German side ever, but the three-time European champions were still odds-on favourites to get their first win of Euro 2004 here. Latvia weren’t overawed by the reputation of their opponents, though, and Aleksandrs Ivakovs picked up a yellow card inside 60 seconds when he clattered Torsten Frings. Starkovs had his men very well organised and Germany found it tough to infiltrate the robustly drilled Latvians. Indeed, it was the outsiders who had the best chance of the first half when Verpakovskis embarked on a mazy solo run that ended with a tame, anticlimactic shot straight at Oliver Kahn.

Germany upped the ante after half-time and Latvia found it increasingly difficult to get out of their own half. Again, though, Verpakovskis was a real threat when he got on the ball and he had a strong claim for a penalty which English referee Mike Riley turned down. Germany’s big chance came right at the end when Miroslav Klose, who shot to fame with five goals at the 2002 World Cup, somehow diverted a free header wide from a central position. It was a let-off for Latvia, but they fully deserved their point and their delight in claiming another famous result was in stark contrast with the dejected demeanour of the Germans, whose chances of getting out of the group now looked very uncertain.

Incredibly, Latvia went into their final group game against Netherlands still with a chance of reaching the quarter-finals, although they would need to win as, despite being tied with the Dutch on points and goal difference, they had fewer goals scored. With both teams a point behind Germany, neither had their fate in their own hands, as a German win over the already-qualified Czechs would take them through irrespective of what happened in Braga, where Latvia and Netherlands faced off at the breathtaking Estadio Municipal, where cliff faces stood tall at either end of the pitch.

Starkovs’ side had hitherto given a tremendous account of themselves at Euro 2004, but this proved to be a game too far. The Dutch were dominant from the start and it was no surprise when they took the lead from the penalty spot midway through the first half, although the awarding of the spot kick seemed dubious. When Ruud van Nistelrooy doubled his tally soon after, the result already appeared inevitable. Latvia had a go in the early second half exchanges, forcing a couple of decent saves from Edwin van der Sar, but the final incision would again come from the team in orange. A coruscating team move was finished off by Roy Makaay and the 3-0 win was ultimately enough for the Dutch to go through because of Germany’s surprise defeat in the other Group D game. It had been a disappointing way for Latvia’s European adventure to end, but that in itself showed how far they had come in such a short space of time. From failing to beat San Marino at home in 2001, here they were drawing against Germany and losing narrowly to a superb Czech Republic team that many felt were the best at the tournament despite semi-final elimination.

If some Latvian supporters had hopes that the summer in Portugal would be the start of a journey rather than the end of one, they would be left sorely disappointed. Veterans like Blagonadezdins and Andrejs Stolcers retired after the tournament, with Zemlinskis following a year later. Their next two attempts at qualifying for major tournaments never truly got going, although they were agonisingly close to having a crack at the play-offs for the 2010 World Cup. Since then, Latvia’s stock has fallen alarmingly. They were beaten by Liechtenstein less than three years after their Euro 2004 draw with Germany and their FIFA world ranking fell to a record low 148th last year, more than 100 places beneath the highest position they occupied in the 2000s. In the current UEFA Nations League, they are members of League D, the lowest rung on the ladder, and weren’t even top seeds in their group.

What Latvia did have for a long time, though, was a team of incredibly loyal players who well and truly earned their fleeting moment in the sun (literally, given the weather in Portugal that June). Astafjevs retired in 2010 with 18 years of service and 167 caps, a European record that stood until last year when usurped by Gianluigi Buffon. Andris Vanins, the backup goalkeeper at Euro 2004 who made his debut four years previously, is still playing for his country. Kolinko also had an 18-year international career, with Stepanovs playing for 16 years and Yuri Laizans and Verpakovskis both racking up 15 years.

Latvia remain one of just three former Soviet states to qualify for a major tournament, and while Russia and Ukraine have both qualified more frequently and progressed further, their resources have been far superior to that boasted by the Baltic nation. Latvia didn’t win any matches at Euro 2004, but they won a lot of hearts – unlike the other underdog nation at the tournament, eventual winners Greece, a team derided for their yawningly conservative tactics. Alas, that summer has proven to be a one-off moment in Latvian sporting history, but they returned home having justified their presence at the finals in a group alongside three former European champions.