Sir Keir Starmer has ruled out entering into a deal with the SNP if the next general election throws up a hung parliament – pointing to the two parties’ “fundamental difference” over the constitution.

But the UK Labour leader has repeatedly declined to end speculation he could enter into a coalition with the LibDems if Labour fails to win a majority at the next general election.

Sir Keir has said he believes he is on course to win outright after gaining hundreds of councillors and control of 22 local authorities at last week’s English local authority elections.

The LibDems were also resurgent in last week’s council elections south of the Border, and projections have put Labour as not yet being in the position to form a majority government without progress among voters.

Sir Keir equivocated on whether he would form a pact with the LibDems if required to enter Downing Street.

Read more: Analysis: New SNP blueprint lines up Labour as main target

He insisted he is “going for an outright majority” but asked about a deal with the LibDems, the Labour leader told Sky News: “I’m not answering hypotheticals but we’re aiming for a Labour majority and that’s what we’re confident about.”

But he said he was “absolutely clear there are no terms in which we will do a deal with the SNP”.

Sir Keir insisted the reason he would only be definite about the Scottish nationalists was because there is a “fundamental difference” between his party and the SNP over independence.

He added: “I do not believe in the break-up and separation of the United Kingdom, I do not believe that our future will be better if we put a border between Scotland and England, so there’s no basis for an agreement.”

Read more: SNP would ‘undo Brexit as far as possible’ in event of hung parliament

Earlier, SNP Westminster leader Stephen Flynn claimed that Sir Keir would break his word and work with the SNP in a hung parliament if it meant entering Downing Street.

Mr Flynn said the UK Labour leader had a track record of changing his mind, and would change it again if the parliamentary arithmetic made it worthwhile.

He told BBC Radio Scotland: “I’m actually quite excited about where we are at the moment because what we see is a big shift away from the Conservatives in England.

“But it’s a shift that is not going to deliver a majority government for Labour at Westminster and that very much brings us into play because it affords us the opportunity, the very real opportunity, of holding the balance of power at Westminster.”

Mr Flynn added: “We would be very clear in terms of our asks. We would want the cost of living to be put front and centre of the policy prospectus of any UK government.

“We would want to see the damage that has been caused by Brexit rolled back, not just to boost our economy but to boost our public services as well.

Read more: Sarwar predicts 'majority Labour government' as he rubbishes SNP deal

“And of course, we would be very, very keen to see a UK government, particularly a UK Labour government, deliver the powers to Holyrood to hold an independence referendum.”

Mr Flynn said that the UK Labour leader “is a man who has broken many of his pledges, not just to the Labour party but to the wider British public in order to try and become prime minister”.

He added: "He is not going to walk away from becoming prime minister simply to deny many of our asks.”

But Scottish Labour leader Anas Sarwar insisted his colleagues at Westminster would reject any coalition or deal with the SNP.

He said: “No ifs, no buts, no deals with the SNP.

“We are going all out to get rid of this rotten Tory Government, all out to get a majority Labour government, and if we fall short of that, the SNP have a clear choice, they can either choose to welcome a Labour government, or allow a Tory government.

“And I dare the SNP to usher in a Tory government and see how Scotland reacts.”

The Lib Dems did not rule out the possibility of a deal.

A spokesman said: “We are totally focused on the issues that really matter to people – the cost-of-living crisis, the failure of this Government to manage our NHS and the filthy sewage water companies are being allowed to pump into our rivers.”