Scotland's involvement in the 1982 World Cup finals might almost have been immediately at risk.

During the draw for the tournament, Jock Stein's side were initially put in a group alongside Argentina. With the Falklands War being fought, the cabinet had been debating asking the home nations to withdraw from the tournament in Spain. An error was made during the draw, though, and Scotland ended up instead in a group with Brazil, the USSR and New Zealand, while the government eventually decided not to request a boycott.

Some ministers remained concerned about the prospect of Scotland facing Argentina in the second round. They were clearly not well-briefed on the relationship between the Scots and the World Cup. The tournaments in 1974 and 1978 had established the understanding that Scotland would marry their haplessness with an act of glorious futility. The 1982 campaign was not quite so drastic, but the outcome was the same: Scotland fell short.

It was a brilliant, if flawed, Brazilian team and the USSR were another heavyweight. A short spell in the Portuguese town of Penina ahead of the finals helped the players acclimatise to the heat in Spain. New Zealand were their first opponents, in Malaga, and Stein selected as many goalscorers as he could, with Dalglish partnering Alan Brazil up front, Gordon Strachan and John Robertson on the flanks, and John Wark providing a threat from midfield. The outcome was typically Scottish, bold, almost undermined, and not wholly convincing, despite the 5-2 scoreline.

"I scored twice and was unlucky not to get a hat trick," recalled Wark. "I had a good chance with a header, but we gave a couple of silly goals away. We switched off. It was 80 degrees, which we weren't used to. They weren't the best goals [to lose], but I wouldn't say it was down to the conditions, just individual mistakes."

Stein had imposed a strict sense of purpose on the squad. The manager did not want the national team's psyche to be its major flaw, and remarked at the time that they did not fear their opponents, only themselves. During preparations, he barely mentioned Brazil, dwelling instead upon the need to overcome New Zealand and USSR if they were to progress.

"He was the only manager I played under who had a presence when he came into the room," Wark said. "We had big characters like Souness and Dalglish in the squad, but there was silence when Jock came in, there was no messing about. He didn't do a lot of the training because he couldn't move so much. It was the Dundee United boy . . . [Jim] McLean . . . who took training, and Andy Roxburgh was about in those days. Jock just stood at the side with his wee mate, the massage boy, [Jimmy] Steel, with their tracksuits on, laughing and joking."

The focus on New Zealand and the USSR may have been a psychological ploy, since spending any time contemplating the task against Brazil would have been intimidating. The team was full of brilliant players, with the likes of Socrates, Zico, Falcao and Eder capable of a casual and elegant mastery of the game. Yet they could not quite cope with the instincts of a Dundonian playing out of position at right-back.

"The famous saying is that we scored first and got them annoyed," Wark said. "I remember Souness pinging the ball 70 yards to me, then I nodded it down to Dave Narey. He took a touch, then smacked it in from 25 yards. You could see when he scored that he couldn't believe it, he didn't know how to celebrate. But in the second half, we were chasing shadows. Brazil were passing it round us and we couldn't get anywhere near them. They just murdered us. It was like they were gliding across the park."

The 4-1 defeat, with goals by Zico, Oscar, Eder and Falcao, left Scotland needing to defeat the USSR, who had the same number of points but were two goals better off in goal difference. Stein's side opened the scoring through Joe Jordan, then the USSR equalised through Aleksandr Chivadze. A collision between Willie Miller and Alan Hansen allowed Ramaz Shengelia in to put USSR in front, before Souness rescued a point with four minutes left. "It was like a pub goal," Wark said of the Miller and Hansen moment. "You can't afford to do that. We felt real disappointment that we didn't go further, given the squad we had."

During the bus journey back from Malaga to the team hotel, Souness asked Stein if the players could be let off at Puerto Banus to wind down. Having kept a tight rein on the squad for three weeks, the manager relented, and the World Cup experience ended with a memorable night out.

"We all headed off in our tracksuits," Wark said. "We were walking by this bar and Rod Stewart was there with his missus, so we had a few drinks and were singing together, then the fans got to know and they were all outside. Rod sent his missus home, telling her he was staying out with us.

"In the morning, I had to pack Alan Brazil's gear into his case for him as he only arrived back half-an-hour before the bus was leaving for the airport."