Allan McGregor has retired from international duty in a move that will force Alex McLeish into a goalkeeping change for Scotland’s Euro 2020 qualifying campaign.

The Rangers goalkeeper, who has earned 42 caps for his country, has decided to call time on an international career that began in 2007. Under McLeish the 37-year-old had established himself as Scotland’s first-choice No1. The player informed the Scotland management of his decision at the weekend, with McLeish to name his squad for the qualifying fixtures against Kazakhstan and San Marino on Tuesday.

“At this stage in my career, and rather than cause any disruption in the middle of a campaign, I feel now is the best moment to step away from international football,” McGregor told the Guardian.

“I have played almost 50 games already this season and, with the prospect of the same again for the next couple of years, I think it’s important to protect my body and take rest periods when possible. Spending time with my young daughter is also very important to me.

“Playing for Scotland was always an honour and this wasn’t an easy decision to make. I want to wish all the management and players the best for the future. I’d love to see them reach a tournament.”

McGregor has excelled since returning to Rangers last summer, to the point where he is likely to be a candidate for Scotland’s domestic player of the year awards.

Scotland’s successful Nations League campaign has left McLeish’s team with a strong chance of reaching what would be a first major tournament since 1998, regardless of events in a qualifying section that also includes Russia and Belgium.

McLeish is likely to turn to Scott Bain, who has played in goal for Celtic since the turn of the year, but will need to source back-up. Craig Gordon, whom Bain has dislodged, was not in Celtic’s squad for the weekend draw with Aberdeen because of injury.

Sunderland’s Jon McLaughlin has previously featured in Scotland squads.