The SNP is on course to remain the dominant party in Scotland at a general election, according to a new poll that reveals support for Labour is drifting back to the SNP.

A YouGov survey gave Humza Yousaf's party an 11-point advantage over Labour and up two points since last month with 38% of voters supporting it. At the same time Labour fell five points to 27%.

It is a reversal of a trend which had shown growing support for Sir Keir Starmer's party north of the Border.

Under Westminster boundaries, this would mean the SNP winning 39 seats while Labour would return 11, a significant increase from the one the party has at present. The SNP holds 44 Westminster seats.

READ MORE: Fergus Ewing shows no sign of backing down before showdown

However, previous polls had suggested Labour could return 22 MPs with the SNP falling to 26.

Today's survey for The Times will be a welcome boost for the First Minister and comes ahead of his first big electoral test since succeeding Nicola Sturgeon as SNP leader with the Rutherglen and Hamilton West by-election next month and also ahead of his first party conference in charge of the party.

But Sir John Curtice, professor of politics at the University of Strathclyde, said the shift in voters' behaviour would not be enough for the SNP to win the by-election on October 5. 

The Herald: Humza Yousaf and SNP candidate Katy Loudon on the campaign trailHumza Yousaf campaigning in Rutherglen with Katy Loudon, the SNP candidate in the Rutherglen and Hamilton West by-election. Photo PA.

The poll is a blow for Mr Starmer and Scottish Labour leader Anas Sarwar with both politicians seeing gains in Scotland as a key in the party's campaign to win the general election, expected next year, and hold a majority in the Commons. 

Mr Curtice said that the poll showed Labour could not assume it was “on a continuous upward trajectory north of the border”.

“It needs to be remembered that Labour is fighting on two flanks — with the Conservatives for unionist voters and with the SNP for Yes supporters — and maintaining that balancing act could well prove far from straightforward as the UK election approaches,” he told The Times.

READ MORE: Humza Yousaf claims SNP election win would see 'immediate' Indy talks

“The SNP will take some cheer from the widening of its lead over Labour. However, at 38% the party’s support is still some four to five points below what it was enjoying before the resignation of Nicola Sturgeon. Regaining the momentum that it lost in the wake of Ms Sturgeon’s exit still remains a challenge for the party.”

Despite the apparent boost to the SNP’s fortunes, backing for independence fell three points to 39% while an unchanged 44% of people said they wanted to remain in the Union. This left 16% who said they were either undecided, would not vote or refused to reveal their preference.

Mr Curtice’s analysis found that the Conservatives would lose two constituencies to return four MPs with 16% of the vote, up one point, while the Liberal Democrats would add one seat to return five MPs with 7% support, also up by one point while 12% of people back other parties.

The Herald: Scottish Labour leader Anas Sarwar pictured on the Rutherglen and Hamilton West by-election campaign trail. Photo: Gordon Terris/The Herald.

In a sign that the SNP leadership will focus on Mr Starmer in the run-up to the general election, Mr Yousaf repeatedly attacked the UK Labour leader during first minister’s questions at Holyrood.

He criticised Mr Starmer’s refusal to guarantee scrapping the two-child benefit cap and Labour’s energy policy. He also rounded on Mr Sarwar for saying he was against further tax increases for middle and higher earners north of the border.

On a campaign visit to Hamilton on Thursday, the SNP Westminster leader Stephen Flynn said he was confident the SNP would remain the leading party in Scotland after the next general election, and vowed the MPs would take “a pretty clear message back down to Westminster with us”.

READ MORE: Poll: SNP face defeat by Labour at next general election

He added: “The people of Scotland want action, not just words, on the cost of living crisis.”

The trend in general election voting intentions was mirrored at Holyrood, where 41% said they would vote SNP in their constituency, unchanged from last month. Labour fell three points to 28% the Tories went up by two points to 16%, the Lib Dems up one point to 8%, the Greens remained on 3% while 4% said they would vote for other parties.

On the regional list, the SNP rose one point to 33%, Labour was down three to 25%, the Conservatives up two to 16%, while the Greens and Lib Dems were both unchanged on 11 and 8% respectively. Other parties would win a combined 7%.

Mr Curtice said this would mean the SNP returning 59 MSPs, Labour 32, the Tories 20, Greens ten and Lib Dems eight in a result that would give a pro-independence majority of nine MSPs.

YouGov surveyed 1,103 people aged 16 and over in Scotland between September 8 and 13.

Commenting on the poll, SNP Depute Leader Keith Brown said: “This poll - the first test of opinion since the First Minister launched his Programme for Government - indicates that voters across Scotland are backing Humza Yousaf’s progressive policy platform, with its twin aims of growing the economy and tackling poverty .

“The SNP will continue to deliver for the people of Scotland, support households through the cost of living crisis, and outline our vision for a fairer, greener, more prosperous independent Scotland.

“The poll is also a clear rejection of Keir Starmer’s agenda of aping the Tories, including on the cruel two-child welfare cap and imposing a damaging Brexit on Scotland."