Scotland's record against Afghanistan in leading into the World Cup qualifiers was unenviable. In their previous seven ODIs, they'd won just once, an anomaly in Abu Dhabi ahead of the 2015 World Cup in which a Josh Davey six-for resulted in Afghanistan being bowled out for 63.

That was before Rashid Khan's debut. Here, besting one of the tournament favourites seemed a tough ask for Scotland. But Calum MacLeod had other ideas.

The Glaswegian batsman's third ODI score of 150 or more - an unbeaten 157 off 146 balls - repelled Rashid in a stunning seven-wicket victory for Scotland, thereby throwing the World Cup Qualifier wide open from day one. The feat was special because no other Associate batsman has done it more than once.

MacLeod's feat put him in rare company as only 12 others in ODI history have scored 150-plus at least thrice in their career. The only six to have done it more than thrice include Sachin Tendulkar, Rohit Sharma, David Warner, Chris Gayle, Hashim Amla and Sanath Jayasuriya.

Macleod was humbled when presented with this stat byte. "To be honest I'm not in that sort of company," MacLeod told ESPNcricinfo. "It's nice. Once you get in and get going, it's your job to capitalise. It's something I've been lucky enough to do and keep doing it. It's something I do pride myself on, that once I get in it's really up to me to go on and make that score as big as possible."

His other 150-plus scores came against Canada in the previous World Cup Qualifier four years ago in New Zealand and then against Papua New Guinea in Port Moresby late last year. However challenging those opponents may have been, facing the No. 1 ranking ODI bowler in the world in his prime is another matter entirely. But MacLeod, who is regarded as one of Scotland's most aggressive players against spin with an array of sweeps and reverse sweeps in his arsenal, had steeled himself for the challenge in the lead-up to the tournament.

"The only thing I focused on a little bit more here was sweeping," MacLeod said. "I think the preparation and all the analyst work we'd done said these wickets might spin a bit more. So the couple of months leading up to it, I spent a bit more time practicing the sweep and getting familiar with it again because it's something I put out of my game a little bit and I'm not entirely sure why.

"So to spend a couple of months practicing it and then take it out and use it in the first game of the tournament is something that I'm quite pleased with because it was something I aimed to bring into this tournament. So there was a bit of preparation that went into it."

Even with the preparation that went into it, MacLeod said it was not a conscious plan to specifically attack Rashid. Scotland had recovered from the loss of captain Kyle Coetzer and Matthew Cross at 21 for 2 in the sixth over to reach 71 for 2 by the end of the 16th when Rashid, in his first match as stand-in captain for Afghanistan, brought himself on.

MacLeod, on 37 off 39 balls then, said his main focus was on countering Rashid's trademark wicket-taking ball by using the sweep. The result was two boundaries off Rashid in his first over. By the end of the day, the legspinner finished with some of his most expensive figures ever, 1 for 68 in nine overs.

"We certainly respected him as the number one bowler in the world," MacLeod said. "Early on in that innings he bowled me a couple of variations and from that I felt the sweep was the best option to go with if I could manage to pick his googly. I wanted to put pressure back on him while respecting how good a bowler that he is. I was probably lucky early in the innings to get those boundaries away against him and was able to stick with that."

MacLeod's knock is the fourth-highest score by a non-opener in an ODI chase, putting him behind three other big guns. MS Dhoni's career-best 183* in 2005 against Sri Lanka, Virat Kohli's 183 in the 2012 Asia Cup against Pakistan and Herschelle Gibbs' 175 in the famous 438 match against Australia. But MacLeod's historic century was only part of the Scotland story on Sunday.

Vice-captain Richie Berrington played an extremely valuable role alongside him, the pair adding 208 for the third wicket, a Scotland record partnership for any wicket breaking the previous best of 203 by Gavin Hamilton and Fraser Watts against Canada in 2009.

It's not the first time they've created history together either. The pair clearly enjoyed each other's company at the wicket because they own the mark for Scotland's highest partnership for any wicket in T20Is too, putting on 127 against Hong Kong at the Desert T20 Challenge last year. By the time Berrington finally fell to Rashid in the 43rd over, the target had been whittled down to just 27 off 46 balls. This came after Berrington had also taken three wickets early in the Afghanistan innings.

"Richie has had an incredibly great day. He was fantastic with the ball and then the way he played through that innings, he never really left second or third gear. Obviously I was able to get more runs than him today but I thought he marshaled that innings expertly. It's one of those nice byproducts that if two guys are able to play nicely together, then we'll create those sort of partnerships."

Scotland wound up clinching victory with 16 balls to spare, but the chase could have been far more strenuous without extraordinary efforts to tie down Afghanistan in the death overs of the first innings. After Berrington's early strikes, Najibullah Zadran and Mohammad Nabi's fifth-wicket stand of 149 had taken Afghanistan to 220 for 4 in the 42nd over. But in a key sequence, Brad Wheal dismissed Najibullah before Nabi was run-out on the very next ball trying to take on Safyaan Sharif's arm for a second run to deep midwicket. Sharif then came back and took two wickets to help wipe out the tail for 255.

"They had a partnership and were taking the game to us," MacLeod said. "At that stage we were just trying to break it and get one of them out to get a little bit of momentum for us. We got the first wicket which in itself was something to strive for but then the very next ball to create a runout chance and take it.

"That was a key moment in the game and where the momentum in the game changed. They certainly would have gone much closer to 300 if we didn't break that partnership. Saffy ran around and did a nice bit of fielding and created the chance. The throw in from Saffy was perfect, straight over the top of the stumps."

MacLeod has had a more unorthodox career path than most, initially coming up through the Warwickshire setup as a medium pace allrounder before being called for a suspect action after an Intercontinental Cup match in 2009 nearly derailed his international prospects. It eventually resulted in the loss of his County contract at Warks. He rededicated himself to his batting, emerging in Scotland's top-order and for a brief time with Durham. His six ODI hundreds are two more than any other player for his country.

One of his biggest supporters through the ups and downs has been his father, Donald. An award-winning professional photographer, Donald is a fixture at Scotland home games staked out on the boundary with his monopod and telephoto lenses. Typically after each home game, father and son have some back and forth banter about whether Donald managed to click the shutter properly. Ironically, all of Calum's 150-plus scores have come away from home, robbing Donald the opportunity to capture some classic shots of his own.

"I've not spoken to him yet," MacLeod said after the win. "I think he'll be a bit annoyed that he missed it. He might have got a few more photos."

At the end of the day, no matter how momentous the occasion is for Scotland, it is still only worth two points. MacLeod and his team-mates know there is still a long road left to travel if they want to take one of the two spots available for the World Cup.

"It's just a good start. All we have to do now is get ready for Hong Kong in two days time."

Peter Della Penna is ESPNcricinfo's USA correspondent @PeterDellaPenna