In September 2014, the people of East Dunbartonshire voted by a 22 point margin in favour of Scotland remaining part of the United Kingdom. In June 2016, they voted by a 43 point margin against Britain leaving the European Union. At the 2015 general election, as the Labour vote collapsed, the SNP took the seat from the incumbent Liberal Democrat MP, Jo Swinson. In 2017, Swinson won it back with a majority of 5339 votes.

In some ways, the constituency, on the northern outskirts of Glasgow, is a bellwether for Scottish middle-class opinion. Its voters may not be keen on radical constitutional change, but they aren’t immune to the appeals of Scottish nationalism.

Swinson’s main opponent in the race for East Dunbartonshire is 27-year-old Amy Callaghan of the SNP. She joined the nationalists five years ago, during the independence referendum, with the aim, she says, of building ‘a more inclusive, left-leaning, socialist Scotland’. She believes Swinson has all but abandoned the constituency since being elected leader of the Liberal Democrats in July. ‘People comment on how they used to see her but don’t any more,’ Callaghan told me when we met at her campaign office in Kirkintilloch.

Swinson’s Westminster track record features heavily in Callaghan’s campaign rhetoric. As a junior minister in the Cameron-Clegg coalition government, Swinson supported the increase in university tuition fees, charges for employment tribunals and the draconian overhaul of the benefits system.

‘Swinson’s a Tory,’ a retired couple, both former Labour voters, told me as they emerged from lunch at an Italian café on the high street. ‘She was there, voting every time for the Tory cuts.’ ‘I’m going with Nicola [Sturgeon],’ the woman said, adding that she didn’t support independence but couldn’t back Jeremy Corbyn for prime minister because he was too ‘dishevelled looking’.

When Swinson was first elected MP for East Dunbartonshire in 2005, at the age of 25, the Liberal Democrats, under the leadership of Charles Kennedy, were seen as a progressive counterweight to New Labour. Swinson was a vocal opponent of the war in Iraq. But in the years since then, the party has moved rightwards, and Swinson appears to have consolidated the shift. In recent weeks, she has repeatedly dismissed the prospect of helping Jeremy Corbyn into Downing Street, despite Labour’s commitment to a second referendum on Brexit. Meanwhile, her deputy, Ed Davey, has said the party would post a permanent budget surplus if it got into power, effectively imposing coalition-era spending constraints on the nation’s finances.

The Liberal Democrats are running a presidential-style campaign, with Swinson cast as a youthful alternative to Johnson and Corbyn. She seems to believe this approach is working, both across the country and in her own constituency. ‘In a sense, I think they’re quite proud their local MP is taking on Johnson,’ she told Scotland on Sunday recently. But it may be having the opposite effect. Most polls show the Lib Dems losing ground as voters focus on the head-to-head contest between Labour and the Conservatives. And polling for the Times suggests that Swinson has become less popular the more her public profile has grown.

Above all, Callaghan thinks she can capitalise on Swinson’s ‘contradictory’ constitutional positioning. At Westminster, the Lib Dem leader has presented herself as an arch opponent of Brexit, determined to stave off Britain’s departure from the EU. But in Scotland, she has argued against a second independence referendum, which the nationalists say is the best – and possibly only – way of salvaging Scottish membership of the European bloc. ‘Five thousand votes might seem like a significant majority, but I think she’s on a shaky peg here, I genuinely do,’ Callaghan told me. She has to say that, of course. But she may well be right, too.