This summer's Euro 2012 group game between Ireland and Spain was too one-sided to hold much lasting significance. Spain's stroll in Gdansk is unlikely to go down as much more than a footnote in their successful campaign to win a third successive major tournament, while most Irish fans will try to forget the 4-0 defeat as quickly as possible. More happily, the game acted as a reminder of a far more momentous meeting between the two countries, 47 years ago, in qualifying for the 1966 World Cup.

The draw in February 1964 grouped Ireland and Spain together with Syria in a three-team group. After a row over scheduling the Syrians pulled out, so a two legged play-off between the two European countries would decide who qualified for the tournament in England. 

Qualification for the finals was even more important than usual for both teams. Real Madrid's success at club level during the 1950s hadn't translated into Spanish success on the international stage. Even with the naturalisation of the Argentina-born Alfredo di Stéfano and the Hungarians Ferenc Puskás and László Kubala, the Spanish did not qualify for Sweden 1958 and, unluckily but disappointingly, finished bottom of their group in Chile four years later with Helenio Herrera as coach.

That performance led to calls for the national side to be made more authentically Spanish. Herrera was replaced by the former nationalist soldier José Villalonga and, in 1963, foreign-born players were banned. Villalonga consciously implemented a more aggressive playing style for la furia española and Franco was delighted when the USSR were beaten in the following year's European Nations Cup final, held in Madrid and suffused with memories from the Spanish Civil War. That victory raised expectations of success at the World Cup, which remained the important tournament to win.

But many in Ireland also felt their time had come. The Irish had never reached a major finals, not even come close, but fans had jealously watched (or more likely listened to) Scotland, Wales and Northern Ireland all impress in Sweden in 1958 with teams they saw as being of a similar standard. Qualification was seen as part of a general trend opening up to the world, with Ireland almost joining the European Economic Community in 1963 and entering the Eurovision Song Contest in 1965. And the tournament was being played in England, where most of the team played and many Irish emigrants lived. The major handicap was the shambolic way the Football Association of Ireland (FAI) was run. The team manager was the former player and Nottingham Forest boss Jackie Carey, but in reality a 'Big Five' selection committee decided everything, including the team line-up for each game. These decisions were often made for political or financial reasons. English clubs regularly refused to release players, teammates had little time to get to know each other, and line-ups varied wildly from game to game. At the simplest level, preparations were amateurish. Even training kit had to be provided by the players themselves. It was not an atmosphere conducive to success, no matter how proud the players were to represent their country.

Ireland 1-0 Spain, Dalymount Park, Dublin, 5 May 1965

Ireland v Spain was a familiar fixture in international football. Perhaps because of their religious and cultural similarities, the countries had already met 10 times, from a 1-1 draw in Barcelona in 1931 to the previous year's European Nations Cup quarter-finals, when Spain had eased through 7-1 over two legs. 

Ireland had been below strength for both those matches, but Carey (or the Big Five) had access to almost their best side for the first leg in 1965. Seven changes were made to the team beaten 2-0 at home by Belgium earlier that year. The FAI took advantage of a recent change in Fifa's eligibility rules to call up the Manchester United defender Shay Brennan who became the first English-born Irishman to play for the national side. That 1964-65 championship-winning United team also provided Brennan's fellow full-back Tony Dunne and goalkeeper Pat Dunne (making his debut as the first choice, Alan Kelly of Preston North End, was injured), while their reserve centre-forward Noel Cantwell was named up front.

Other well-known names in the side included the Leeds United midfielder Johnny Giles, the Sunderland centre-half Charlie Hurley and the Blackburn inside-forward Andy McEvoy, who had just finished level with Jimmy Greaves at the top of the English league goalscoring charts with 29 goals. Even the League of Ireland representatives Frank O'Neill and Jackie Hennessy were players of quality; in those days domestic Irish football was not the backwater it is today. This was about as strong an Irish team as had ever taken the field. Carey told reporters he was confident, as for the first time in four years the team had been together for three days before the game, giving them a chance to prepare properly.

Villalonga (referred to as the "sole selector" in the Irish papers) had fewer options. He was without the Italian exiles Luis Suárez (on European Cup duty with Internazionale against Liverpool) and Luis Del Sol, while injury ruled out the five-time European Cup winner Paco Gento of Madrid and Barcelona's 'Chus' Pereda. Six of the team that had beaten Ireland in the 1964 quarter-final remained, including the Athletic keeper José Ángel Iribar, the fearsome Real Madrid wing-half Ignacio Zoco and the Real Zaragoza centre-forward Marcelino, who had headed the winner in the European Nations Cup final against the Soviets. Luis Aragonés, then at Atlético Madrid, was an unused member of the travelling squad.>

40,000 Irish fans packed into Dalyer for the afternoon kick-off. Both teams made bright starts. After eight minutes Hurley headed a Giles cross into the net but the Welsh referee Leo Callaghan whistled for a foul by Cantwell. At the other end the Ireland defence got in a tangle but the Atlético inside-forward Adelardo blazed over the bar from inside the area. McEvoy was soon running clear on goal but Iribar saved with his feet, Zoco getting to the rebound ahead of the Shamrock Rovers' outside-right O'Neill.

As the game settled down Carey's tactical preparations looked to have Ireland playing a more cautious defensive game than usual with Giles playing very deep. Spain gradually imposed themselves as Zoco and his fellow wing-half Jesús Glaría started to control the central areas, and they created a series of chances in the lead up to half-time.

The visitors began the second half again with more of the ball. Marcelino dithered over a shot having found space in the area. Pat Dunne beat the Valencia inside-forward Vicente Guillot to a deep cross. And then, on 63 minutes, against the run of play, Ireland went ahead. 

Giles was fouled 40 yards from goal out on the right wing. O'Neill knocked the free-kick into the area and Cantwell jumped with Zoco. Neither got a touch but a distracted Iribar took his eye off the ball, letting it slip through his fingers into the net. Callaghan ignored Spanish complaints and the goal stood, as the legendary Irish commentator Philip Greene screamed, "Look at him, look at him in anguish!"

Their tails up, the Irish looked for a second. Iribar half-redeemed himself with a full-length stop from O'Neill and McEvoy hit the side netting from a narrow angle. The visitors rallied and spent the closing stages camped in the Irish half. Their best chance to equalise came with two minutes remaining as Zoco's cross found Guillot unmarked in front of goal. To Irish relief, his free header flew inches wide. 

The Spanish players were unhappy with what they saw as hard tackling and weak refereeing and refused to swap jerseys on the final whistle. Mundo Deportivo placed the blame elsewhere, saying the team's defence had been fine (apart from Iribar who had been "bewitched" by the Celts) but its forward line had been very disappointing. The Irish Times took a different line: Hurley had been "once again a colossus" in an outstanding Irish defensive display which gave their side an advantage to take to Seville for the second game.

Spain 4-1 Ireland, Estadio Sánchez Pizjuán, Seville, 27 October 1965

Irish optimism was dimmed before they set off for Seville in late October, as Brennan and Hurley were both unable to travel because of injury. Theo Foley — then at Northampton Town, later to be George Graham's assistant manager at Arsenal — came in at full-back and Huddersfield's Mick Meagan replaced Hennessy at wing-half. Cantwell dropped back to centre-half with the Shelbourne centre-forward Eric Barber getting a first senior international call.

In an incident typical of the way the team was managed, Barber almost missed the flight to Spain. Suffering a toothache over the weekend, he decided to go to Dublin's dental hospital and have the tooth removed. Waking late on Monday morning due to the anaesthetic, he had to leap from his bed and take a taxi direct from the hospital to the airport. He just about made it in time and started the match despite "suffering from a badly swollen face" (and the fact that Carey had apparently never seen him play).

By contrast Spain were much closer to full-strength with the key interiores Pereda and Suárez both back. Iribar paid for his mistake in Dublin as the Real Madrid keeper Antonio Betancourt, making his debut, replaced him. The Spanish authorities brought the squad together for two weeks in advance to prepare, training on the pitch at the Sánchez Pizjuán. When the Irish tried to train there the evening before the match they were informed that heavy rain had made the surface unplayable, leading Carey to take the squad across town to Real Betis's Estadio Benito Villamarín.

A full house of about 50,000 Andalucian fans jammed in and, according to the Irish papers, the home team had further motivation in the form of a 50,000 pesetas (£300) a man win bonus. They began the game on top, with Foley clearing a Pereda shot off the line after only five minutes. As Ireland struggled to keep the ball, Marcelino crashed a header off the bar from a corner. It seemed only a matter of time before Spain took control. 

But 19 minutes in the visitors forced a rare attack and Barber was obstructed inside the Spanish area. O'Neill touched the indirect free-kick to the Blackburn left-half Mick McGrath, whose 20-yard shot flew past Betancourt. After a moment's hesitation on all sides, the Spaniards rushed to the Portuguese referee Décio Freitas to complain. To Irish dismay, Freitas said the free-kick should be retaken, as he had not been ready. The momentum had nonetheless swung and, after 26 minutes, Giles's deep cross was volleyed in from close range by McEvoy to make it 1-0. 

Both teams seemed to enter a state of shock. The crowd began to get on the home players' backs but the visitors lacked the belief to take advantage. Bit by bit the Spanish took control again and the game turned completely in four minutes just before half-time. First a cross from the Zaragoza winger Carlos Lapetra evaded both Marcelino and Cantwell and ran for Pereda to shoot powerfully home. With the Irish rocking, Zoco took a free-kick quickly. Dunne could only parry it as far as Pereda who knocked in the rebound to make it 2-1. This time Freitas saw nothing wrong.

Ireland's challenge faded further in the second half. Dunne saved from Pereda and Cantwell cleared a shot from Atlético's José Ufarte off the line before Pereda got his hat-trick from a tight angle. Lapetra's snapshot from the edge of the area removed any doubt. Giles had a late effort which flew too high but Ireland were well-beaten.

The Spanish press was in no doubt that the better side had won. ABC's match report was headlined, "Spain achieve a fair and spectacular victory over Ireland," saying Freitas and his assistants were "impeccable" in their work and not mentioning the disallowed early goal. The Irish papers were less happy. "The Portuguese referee was not at all helpful towards our efforts," protested the Irish Times. "He was too prone to hearken to the many appeals of the Spanish and in the long run spoiled what could have been a memorable game."

Under Fifa rules the teams had to settle the tie by meeting a third time in a neutral country, with goal difference only counting were this game to end level after extra-time. So the long-serving FAI general secretary Joe Wickham and Real Federación Española de Fútbol (RFEF) president Benito Pico sat down with Fifa officials to discuss their options. Wickham wanted Liverpool or London, Pico suggested Lisbon. Rotterdam was also floated as a possibility. After negotiations had dragged on until 3am all involved finally agreed on Paris. At the time this was reported as a fair compromise but even the FAI website now admits that the Spanish offered up both countries' share of the gate receipts to secure the agreement. The money involved was about £25,000, three times the FAI's annual income but much less than countries received for actually qualifying. Wickham and the rest of the Big Five showed what little faith they had in their own team's ability by taking the money on offer.

None of these details made the Irish Times story on the negotiations. The FAI claimed that there was "genuine relief" at the choice of Paris, as the other option, Lisbon, was to be feared given the "biased exhibition of refereeing by the Portuguese official" the night before. "Paris is within easy reach of both Dublin and Madrid," Wickham said. "And while we cannot anticipate any great financial return, we should at least manage to keep our heads above water."

Ireland 0-1 Spain, Parc des Princes, Paris, 10 November 1965

Rumours of the back-room deal surfaced in the French and Spanish press, but the Irish players were reportedly none the wiser as they travelled to Paris the following month. Injuries were again the biggest concern, with McGrath, as well as Hurley and Kelly, not released by their clubs. There was puzzlement at the Big Five's eventual selection, with Foley first named at outside-right, then right-half when McGrath pulled out, despite never having played either position before. Moving Brennan forward to look after Suárez, who had been excellent in Seville, would have made more sense. The 20-year-old Eamon Dunphy, then at fourth-division York City, made his debut at inside-forward.

Any ideas the Irish players had about a neutral venue were quashed when they walked out onto the pitch at the Parc de Princes and saw a sea of red-and-yellow flags and banners. There was a full house of 36,000, most of whom were members of Paris's large ex-pat Spanish community, which included both political and economic refugees. It is not known if Samuel Beckett, who was living in Paris at the time, attended, but if he did he and his countrymen were outnumbered by about 200 to 1.

Villalonga was able to name the same side as in Seville and they again had two weeks together to prepare. They began confidently but the Irish had the better early chances with Giles and McEvoy sending headers wide. Spain's first clear opening came on 17 minutes as Suárez's pass split the Irish defence and Pereda ran clear but shot wide. 

Both teams played aggressively and just after the half hour Pereda danced past Tony Dunne inside the area, but the full-back got back to block the shot. Ireland's best chance of the game came after 34 minutes as Giles' right-wing cross picked out McEvoy inside the six-yard box. His first-time half-volley beat Betancourt only for Zoco to stick out a toe and divert the ball for a corner. Approaching the interval Irish keeper Pat Dunne saved well from Glaría and Zoco.

"In the second half the play grew in intensity, if not in class," the Mundo Deportivo match report read. Suárez went down injured just after the break but Ireland carried on attacking, aggravating the crowd. Pereda and Ufarte both spurned chances while Giles almost caught out Betancourt with a dipping long-range effort. 

The Spanish fans and players had perhaps been overconfident and had not expected the third game to be this close. Supporters began a slow handclap in the stands while the tension rose on the pitch. A running battle began between Glaría and Giles, with other players getting involved. With just a quarter of an hour remaining the game remained goalless. The Spanish had the aggregate lead, but everyone knew one piece of genius, a mistake, or bad luck could end their chances of playing in a World Cup. 

Another strong challenge saw Foley leave the play for treatment and just as he returned, Spain struck. A pass from the liberated Suárez sent Pereda racing down the right-wing and the Barça man skipped past Tony Dunne before crossing towards the near post. Marcelino stopped Cantwell from clearing properly and the ball broke kindly for the unmarked Ufarte to shoot past Pat Dunne from close range.

McEvoy missed a chance to equalise but with gaps opening at the back Suárez was denied a Spanish second by another top-class save from Dunne. Tempers were now severely frayed and Ufarte needed treatment after a forceful tackle from O'Neill. At the final whistle Pat Dunne confronted some of the Spanish players, with Cantwell intervening to hold him back. According to the reports all involved quickly calmed down — Foley and Reija apologised to each other and the mood was soon friendly.

Cantwell told the Spanish papers afterwards that "Spain's win [was] fair. If we had managed to bring the game to extra-time, we could have imposed our greater fitness, but I want to congratulate Spanish football."

The Irish Times was also content with the performance, saying that "To a man the Irish team played magnificently, and with admirable skill as well as their usual fighting spirit… even though Ireland had failed, they gained greatly in prestige by this tremendous fight against one of the best teams in the world." This view was shared in the French media with L'Equipe headlining its report "Ireland would have been worthy winners" and saying "Spain did not steal their victory, but it is fair to say that Ireland, by their courage and the quality of their play during certain periods, would equally have deserved to qualify for the finals."

Giles remembers things differently. The episode features heavily in his excellent 2010 autobiography, in which he recalls how bitterly disappointing it was to miss out on a World Cup. Especially frustrating was the failure to press home their lead in Seville, when even a draw would have been enough to qualify. He "detested" the "inferiority complex" of some of his teammates and those around the team.

This discontent resurfaced when Ireland and Spain were drawn together again in qualifying for the 1968 Euros. After a 0-0 draw at Dalymount, the breaking point came when an increasingly critical Giles was dropped in favour of Waterford United's Alfie Hale for the away game in Valencia, which the Spaniards easily won 2-0. Ireland's best player (maybe ever) soon decided that international football was just not worth the hassle.

"Weighing it all up, I didn't need much encouragement or excuse to miss a few matches," he recalls in his book. "I am aware now — as I was then — of what an honour it was to play for my country, but I felt I would not be serving my country in any way by going along with this racket."

Other players also grew fed up with the FAI's amateurism and decline set in. The team went six years without winning a match at home and crowds dwindled. This brought financial pressure on the Big Five to cede some power. Meagan was appointed national manager in 1970, but it was only when Giles himself was surprisingly offered a player-manager job in 1973 that things began to be organised professionally. Even so it wasn't until Euro 88 that Jack Charlton's side finally reached a major international tournament.

Neither was joy unconfined in the winning camp after the third game in Paris. Villalonga admitted he was surprised how well Ireland had played, while apologising for his own side's lack of cutting edge. "I expected the Irish team to play so physically, and to use every means available to try and win, but I did not expect them to play their part in such a good game of football," he said. "Our objective is fulfilled, maybe we did not have too many shots at goal, but all the boys played with passion and a will to win as they had been instructed."

Unimpressed journalists argued the team would have to up their game considerably to achieve anything at the finals and — in phrases very familiar to 2012 ears — complained about players who were over-elaborate in possession and did not look to kill off games. "The national team always gave the impression of being superior technically, of being able to move the ball better than the Irish, adept at their typical triangular passing move, which they practice to exaggeration, including dangerous passes between defenders," wrote Carlos Pardo of the Barcelona-based Mundo Deportivo. "But technical superiority does not mark the difference between two teams on the scoreboard. That is the problem we will have to solve before London."

The Franco-friendly ABC even complained that the team was lacking a physical presence up front, and wanted Villalonga to drop Suárez, who was unpopular with the regime after moving to Italy. This was la furía española, which was supposed to steamroll opponents with its physical power and commitment to the cause. Villalonga chopped and changed from game to game at the following year's finals but Spain could not progress from a difficult group with West Germany, Argentina and Switzerland. Subsequent coaches up to and including Javier Clemente stuck to a physical and furious approach, with little success. Lacking a secure identity Spain failed to qualify for the 1970 or 1974 World Cups and then flopped as hosts in 1982. It was only in 2008 after Aragonés had put together a team packed with Suárez types such as Xavi, Iniesta and Silva that Spain began to win again.

With Ireland having at least qualified for this summer's tournament and Spain boasting perhaps the best international team in history, 1965 may seem like the distant past now — both countries eventually learned their lessons and made the changes in outlook required to bring success, at least relative to their population size and football tradition.

Or maybe not. Few who watched FAI president John Delaney's drunken antics in Poland will view today's organisation as professionally run. Giovanni Trapattoni's strange team selections at times echo those of the Big Five, while Roy Keane's comments about some fans and players being happy just to go along for the sing-song chime with Giles's thoughts in his book. Meanwhile many pundits in Madrid and elsewhere spent June debating whether Spain were too reliant on short passing and needed a more direct approach.