Gordon Strachan praised Gibraltar for "making my life a misery" for spells of their Euro 2016 qualifier.
Strachan conceded he received a fright when the visitors equalised at Hampden before Scotland secured a 6-1 victory.
"All the credit should go to Gibraltar today," said Strachan. "They made my life a misery for periods of that game and a long game for me as a coach.
"It was nice to see Steven Fletcher score a hat-trick and he was one of our better players today."
Shaun Maloney fired Scotland in front from the spot before Lee Casciaro equalised with his side's first competitive goal. Maloney added another penalty, with Steven Naismith also netting.
The Scotland manager said two of his goalkeepers would have been happy missing the game, but not David Marshall who conceded when Casciaro found his bottom corner.
"Allan McGregor and Craig Gordon now love me and think I'm the best manager in the world for not picking them; they're not in the history books," Strachan added.
Regarding Gibraltar's goal, Strachan said: "It was partly down to us. We spent all week on attacking and width; we then fell asleep taking it for granted they wouldn't attack, and they did.
"We were caught walking out when we should've been walking back. So, that made it an interesting couple of minutes.
"But Shaun held his nerve and we've all been there: taking a penalty against one of the minnows, and he despatched that well.
"It's ironic because I was here [at Hampden] when Colin Stein scored four [in 1969] - that was a long time ago and a few stones ago."
Strachan employed a formation with only three at the back: Russell Martin flanked by Alan Hutton and Andy Robertson.
"It got us four goals," said Strachan, who changed his formation for the second half to 4-4-2 with Gordon Greer replacing Matt Ritchie.
"But I was expecting that system to work a lot better than that but the goal threw us a bit."
Strachan noted that his side gave the ball away eight or nine times in the opening 10 minutes; too much, he said, at international level.
Victory saw Scotland move level on points with Group D leaders Poland and world champions Germany, ahead of the Poles facing Republic of Ireland in Dublin on Sunday evening.
Strachan said he was unsure how he wanted the Poland game to go, adding: "All I know is that, after five games, we're here and we've got 10 points.
"I think we're all happy with that and we go onto the second half of this group feeling quite good about ourselves."