John McGinn scored twice as Scotland survived a scare against North Macedonia to claim a 2-1 Nations League victory at Hampden Park on Friday night.

The Aston Villa midfielder struck twice in the second half, including a penalty winner, to give Scotland manager Sébastien Pocognoli his first home victory since taking charge of the national team.

The result keeps Scotland’s hopes of reaching the Nations League promotion play-offs alive, although they must now beat Switzerland in their final group match on Monday and hope Slovenia drop points.

It was a frustrating evening for the Tartan Army, with Scotland dominating possession and creating numerous opportunities before eventually finding a way past the visitors.

The night also marked a milestone for captain Andy Robertson, who equalled Kenny Dalglish’s record of 102 appearances for Scotland.

Pocognoli’s side went into the match looking to recover from a disappointing home defeat against Slovenia last month. North Macedonia had lost all four of their previous group matches without scoring.

Scotland started with plenty of possession but struggled to break down the visitors, who were content to defend deep and frustrate the home side.

Scott McTominay, making his return to the Scotland team after missing the previous international window, came close to opening the scoring with a powerful effort that was brilliantly saved by goalkeeper Stole Dimitrievski.

The Napoli midfielder was involved in much of Scotland’s attacking play, producing another dangerous effort and attempting an acrobatic overhead kick that cleared the crossbar.

Ché Adams also threatened, forcing Dimitrievski into another save with a deflected header.

Despite their dominance, Scotland went into the interval level, with sections of the Hampden crowd expressing their frustration at the lack of goals.

The home side should have taken the lead within seconds of the restart.

Adams capitalised on a defensive mistake and pulled the ball back to Billy Gilmour, who somehow fired over the crossbar from six yards with the goal at his mercy.

Scotland finally made the breakthrough in the 54th minute.

Ryan Porteous sent a long header forward and Adams battled past two defenders before releasing McGinn, who drove a low shot across Dimitrievski and into the bottom corner.

Hampden erupted, although the celebrations lasted just three minutes.

North Macedonia equalised in the 57th minute when Elmin Rastoder met an Enis Bardhi corner with a header that flew beyond Angus Gunn.

It was the visitors’ first goal of the Nations League campaign and left Scotland facing the possibility of another disappointing home result.

Pocognoli’s players continued to push forward, but North Macedonia grew in confidence and began to threaten on the counterattack.

The decisive moment arrived in the 73rd minute when Ben Gannon-Doak was brought down by goalkeeper Dimitrievski inside the penalty area.

Referee Michal Očenáš initially allowed play to continue before being advised to review the incident on the pitchside monitor.

After watching the footage, he awarded Scotland a penalty.

McGinn stepped forward and confidently fired his spot kick down the middle of the goal in the 74th minute, sending Hampden into celebration once again.

The double took the 32-year-old to 24 international goals, moving him level with Hughie Gallacher in joint third place on Scotland’s all-time scoring list, behind only Dalglish and Denis Law.

Scotland held on through the closing stages to secure three valuable points and end their wait for a home victory under Pocognoli.

The result leaves Scotland third in Nations League Group B1 with seven points, one behind Slovenia. Switzerland have already secured top spot and promotion.

Scotland travel to St Gallen on Monday knowing they must win and hope North Macedonia can prevent Slovenia from taking all three points.

Robertson, meanwhile, will have the opportunity to move beyond Dalglish’s 102-cap mark and become Scotland’s outright record appearance holder.

For McGinn, it was another influential performance in a Scotland shirt, with his two goals rescuing a victory that had looked far from certain.