'RESPECT," said David Cameron to the UKIP leader Nigel Farage after the Conservatives received their biggest shock since 1997 in the English local elections on Thursday night.

The "fruitcakes and loonies", as the Prime Minister once described the United Kingdom Independence Party members, now have their hands on the windpipe of the Tory party. Cameron insists that he will listen in future to what they are saying. What does he mean?

Well, by common agreement, Middle England turned out to vote for UKIP last week, not only because of antagonism towards the European Union, but also because of fears of immigration being out of control, antipathy towards welfare "scroungers", discontent at government plans to introduce same-sex marriage and resentment at climate change and human rights policies "coming from Europe".

UKIP says it wants to "repatriate" English law from Brussels. It was, as many defeated Conservative candidates pointed out, a reaction against liberal "metropolitan" Conservatism by the ranks of traditional grassroots Tory voters.

Farage was right to call it a sea change. John Curtice, the normally sober psephologist, described the UKIP result as "spectacular" and declared that the party is now well ahead of the Liberal Democrats and not far behind the Conservatives. Even Labour has been losing to UKIP in England, which suggests that we may soon see Ed Miliband agreeing in principle to a referendum on Europe – he already agrees with renegotiation of the terms of British membership.

The message is clear: the UK could be on its way out of Europe. At the very least, the terms of British membership of the EU are likely to alter significantly whatever party wins the next UK General Election. Labour cannot ignore this tide of anti-European sentiment south of the Border. Miliband will have to start talking Europe down.

But it is not just Europe that is at issue now. It is no accident that UKIP wiped out all the British National Party councillors when the results came in on Friday. UKIP is now the acceptable face of right-wing nationalism in England. It was winning around 25% of the vote in English seats last week, which makes it potentially the party that could decide the outcome of the next general election. Ken Clarke called them "clowns" only last week, but the last laugh has been on him.

Some commentators have been calling UKIP England's answer to the SNP, though this betrays a lack of understanding of the dynamics of Scottish politics. I can't imagine Alex Salmond sharing a platform with Nigel Farage. What such commentators mean is that UKIP is now the main vehicle for protest votes in England. But in Scotland the "protest" is an essentially social democratic one; whereas in England it appears to be very much of the anti-immigration right.

The SNP in government has pursued policies – free personal care, support for the EU, opposition to welfare reform – that would horrify UKIP. Nigel Farage's success in England means that the rift in political attitudes between these two UK partners is now deepening. On this showing, England is moving rapidly to the right, while Scotland, following the SNP landslide in 2011, is moving rapidly in the other direction.

David Cameron will now be under even greater pressure to veto any future measures proposed by Europe, such as the financial transactions tax, limits on banker bonuses, or extensions of social protections like the social chapter. But these are policies that find favour with many Scots. Opposition to Europe is very much weaker in Scotland than in England, and the same is true with immigration and issues like gay marriage. There is no evidence of popular opposition to immigration in Scotland and most Scots say they support same-sex marriage.

UKIP won only 5% of the vote in the 2009 European elections and came well behind the Green Party. It has fewer than 1000 members in Scotland. All the mainstream parties – SNP, Scottish Labour Party and the Scottish Liberal Democrats – are pro-European and take a liberal line on issues like immigration.

David Cameron has already promised a referendum on independence from the EU after renegotiating the terms of British membership. But UKIP supporters clearly don't believe he is serious.

They want something much more tangible, and Tory backbenchers, such as Bill Cash, are now urging the PM either to have an early referendum, or to pass a bill in this Parliament that would commit the incoming government after 2015 to holding one.

Cameron now finds himself roughly where Alex Salmond was in 2011, batting off calls for an early referendum on independence. Why wait? Why prolong the uncertainty? Cameron was one of those who said there was no justification for Salmond to delay the Scottish independence ballot. How tasty those words must be today.

The interaction between the UK independence referendum and the Scottish independence referendum could now determine the future of Scotland's place in both the EU and the UK.

Hitherto, the debate in Scotland has been over whether and how Scotland might have to renegotiate its membership of the EU if there is a Yes vote in the referendum. However, it now looks equally likely that Scots would find themselves leaving Europe if they remain with the UK.

And there would be no way back, because if Scotland remains part of the UK it will not have the option of rejoining on its own. Supporters of Europe in Scotland now have to consider whether voting yes to independence is the only way to guarantee Scotland stays in the EU.

The one thing that is not in doubt is that an independent Scotland would be allowed access to the EU under revised terms.

The crunch will come in May 2014, when the elections are held for the European Parliament. If the Conservatives haven't by then firmed up their referendum, it is clear that UKIP could win those elections.

That will serve notice on Britain's membership of Europe as we understand it today. What a curtain-raiser that would be to the Scottish independence referendum campaign that will be start immediately after the euro votes are counted.

It is a remarkable turn of political fortune that no-one expected. Nigel Farage could hold the key to Scottish independence. Send in the clowns? They're already here.