IF Theresa May fails to obtain the consent of the Scottish Parliament for her EU Withdrawal Bill but continues to take Scotland out of the EU, then there will need to be a second referendum on independence, a senior SNP MP has said.

Tommy Sheppard was speaking at a debate in Westminster Hall on Scottish independence.

It was being held after petitions on the Commons website attracted the 100,000 signatures needed to spark a debate.

One calling for no referendum was signed by 221,514 people, while another backing a vote was signed by 38,515.

The debate was something of a Better Together reunion, with 15 Unionist party MPs speaking and speeches from just three SNP MPs.

Sheppard rejected an attempt to paint pro-independence supporters as being obsessed with flags and identity.

“This is not a question of identity,” he said. “I speak as someone who was born and brought up in Northern Ireland and who carries a British and an Irish passport.

“This is not a question of identity. Far from it. If there was any nation that had a surfeit of icons for its identity it would be Scotland.

“We have the flags and emblems – what we lack is the ability to control our own lives and use our own natural resources and chart the destiny of our country.

“This is about empowerment and about power. People would do well to understand that is the nature of the debate that is happening in Scotland.”

He also denied the SNP were failing to respect the result of the 2014 referendum, saying changing circumstances meant a rethink should be allowed.

“If you get back from the shop and open the box and what’s inside is not what’s described on the cover, then you have the right to go back and get your money back,” he said.

Aberdeen Tory MP Ross Thomson said: “It has become crystal clear that the SNP have overplayed their hand on Brexit and a second independence referendum.

‘‘The opinion polls show that the Scottish people are in fact the biggest barrier to a second referendum because they simply do not want one. And support for independence since 2014 has crumbled.”

West Aberdeenshire Tory MP Andrew Bowie argued there was no growing support for independence. “No has consistently been in the lead,” he said. “Indeed the average lead for no in the last 30 polls has been eight points.”

He said the snap election in June had reinforced this. “62.5 per cent of votes cast were for the Unionist parties, with 39 voting for separatism,” he said. “The people of Scotland are abundantly clear, they do not want a second referendum”

Bowie added: “Independence is the SNP’s raison d’etre and actually I respect that position.

‘‘It is a respectable and laudable position but we have had a referendum, it was supposed to be a once-in-a-lifetime referendum.”

Sheppard said it was wrong for the Tory MPs to think the SNP losing 21 MPs in June’s snap election was what had caused the First Minister to delay plans for a second independence referendum.

“It is an irony that the reasons the Scottish Conservatives think the pause button has been pushed on the referendum timetable is because they won their seats.

‘‘In truth the reason why it’s been paused is because the Tories lost seats in England and we now have a hung parliament and we don’t quite know what the outcome of Brexit is going to be.

“What happened with Brexit would decide if there was to be a second independence referendum.”

He added: “There are only two ways that this can go from here. One is that the United Kingdom government will come to an agreement with the Scottish Government and the Brexit process will go through with the consent of the Scottish Parliament. That is one possible outcome.

“Or the other option is the United Kingdom Government will ignore the representations of Scotland and it will overrule them and proceed regardless anyway.

“In those latter circumstances, I tell you here today, the mandate from 2016 is still there and it will be executed, because we will give the people of Scotland the right to decide whether they want to have the isolation economic chaos that Brexit represents or whether they want to revisit the decision taken in 2014 ... and this time decide they would be better off taking matters into their own hands and taking back control to Scotland.”