You may have seen the video of a Scottish nationalist podcaster saying he would be prepared to shoot English police crossing the Border. You may also have seen the video of Nicola Sturgeon trying to calm SNP divisions over trans reform (a number of young people have been leaving the party over the issue). I think both the videos are significant in their own way. They are revealing. They are connected. And they tell us something important about the SNP.

First up, the videos confirm what everybody already knows, that the SNP is a bit like any other party: an alliance of opposites, a church of zealots and agnostics, a boatful of different people sailing under the same flag (or trying to). Hence Labour includes Tony Blair and Jeremy Corbyn, the Tories include Kenneth Clarke and Jacob Rees-Mogg, and the SNP includes Joanna Cherry and Kirsty Blackman. Everybody is supposedly on the same side, but on certain issues (Brexit, trans rights, or whatever) they are divided.

Read more: Why is Nicola Sturgeon backing Goliath and not David?

Faced with such a problem, every party tries to keep a lid on it, and sometimes they succeed and sometimes they don’t. For a while, Labour under Blair had control of the hard left because everyone saw that Blair could beat the Tories, and much the same has happened with the SNP. Nationalists can see their strategy works at elections so there’s an incentive to keep schtum, and still is. Teddy Hope, a former trans officer with Out for Independence, says people have been encouraged to stay quiet on transphobia for the sake of the bigger cause – in other words, to stay wheesht for indy.

However, in recent months, the issue of trans rights has increasingly put a strain on the unity-for-indy strategy. There have always been divisions in the SNP, between right and left, hard-liners and play-it-safers, and latterly between Sturgeonistas and Salmondistas, but the trans issue is particularly significant because it touches on something that, in one way, is the SNP’s greatest achievement and in another its greatest paradox: the alliance it has managed to forge between hardcore nationalists and modern liberals.

The best analysis I’ve seen of this phenomenon is in the new book by the political scientists Maria Sobolewska and Robert Ford. The main focus of their book, Brexitland, is the trends that led to the vote to leave the EU, but it also looks at Scottish nationalism and the similarities (and differences) with Brexit. The political histories of the two movements may be different, they say, but the cores are exactly the same.

What they’re referring to is the ethnocentrist: the type of voter who has a view of the world in which their own group is the centre of everything. Sobolewska and Ford suggest the phenomenon may be an aspect of the authoritarian personality type – a tendency to value and insist upon conformity (“wheesht for indy”). They also point out that ethnocentrism varies by education, with graduates much less likely to express loyalty to a national unit. Ethnocentrists are also likely to reduce society to “us and them” and feel aggressive towards “them” (as in the video of the podcaster, for instance).

The point the authors are making is that both the campaigns for Brexit and Scottish independence found their strongest early support from these ethnocentrist types and they still form the core of both movements. What’s different about the SNP is they were able to expand beyond the core and bring together a coalition encompassing ethnocentrists and “identity liberals”: generally more educated voters who express higher support for individual and minority rights. Identity liberals are the most likely to champion LGBT people in general and trans rights in particular.

Read more: If a second independence referendum happens, the question has to be different

What the SNP has been able to do is attract both of these groups by offering – in plain sight – something for everyone. Here’s how Sobolewska and Ford describe it: the SNP’s narrative, they say, “married ethnocentric resentment of the English with centre-left economic ideology and promises of a liberal, multicultural Scotland … negative views of migrants and minorities were (and are) roughly as widely held in Scotland as in England and Wales, but they were ignored by the SNP, who directed ethnocentric voters’ resentments towards London and the Tories”.

So far, it has to be said, the strategy has worked well, but it isn’t easy to hold together. As Sobolewska and Ford point out, levels of ethnocentrism in Scotland are comparable with those in the wider UK – similar numbers believe “being born in your country” is important. It also varies in similar ways by education: English school-leavers see European migrants as threatening and many Scottish school-leavers feel similarly about English migrants. Voters of this kind form a big part of Yes support and the SNP needs them.

The problem it creates for the party is that they’re left trying to hold together a group that encompasses ethnocentrists who may hate the English and progressive identity liberals championing the rights of trans people. In any ordinary world, these two types wouldn’t belong to the same party and, as it turns out, not even independence is enough to keep some of the liberals within the SNP.

The important question is where it goes from here and Sobolewska and Ford point out an apparent contradiction. The Brexit movement relied on its ethnocentrist hard-core while the SNP reached out beyond it, and yet Leave won and Yes lost. Why? Sobolewska and Ford say it’s because the attachment to Europe in England is weaker than the attachment many Scots feel for Britain. In other words, the SNP church was broad but still not broad enough.

The obvious problem this creates for the SNP for the future is they need to broaden their congregation even further if Yes is to win, which means they cannot afford a threat to the coalition they already have. The likelihood, of course, is that people quitting the SNP over trans rights would still vote Yes, but elections could be different. If Sturgeon is to stay, and the SNP is to keep on winning, not just this election but the one after that too, the unholy alliance – the alliance that is under considerable strain – needs to hold for a long time yet.

Our columns are a platform for writers to express their opinions. They do not necessarily represent the views of The Herald.