Labour was predominantly viewed by voters in the general election as the party of soft Brexit during a campaign dominated by the subject of how best to depart the EU, a major study of electoral opinion has concluded.

The long-running British Election Study, which has followed a 30,000-strong panel of voters over the past three years, found Labour picked up significant support from remain-minded voters, despite its ambiguous stance on what sort of Brexit deal to pursue.

The latest set of data from the study team found that Brexit far outstripped any other single issue in the minds of voters prior to the election.

When asked to name the single most important subject facing the country, just over a third of the panel named Brexit, against about 10% each for terrorism and the NHS, with only about one in 20 citing the economy.

When actual votes were taken into account, the Conservatives were “the party of leave” at the 2017 election, according to Ed Fieldhouse and Chris Prosser from Manchester university, which jointly runs the election study.

They found that more than half of those who voted Ukip in 2015 and voted again in 2017 backed the Conservatives, with only 18% going to Labour and the same proportion supporting Ukip again. The Tories took more than 60% of the leave vote overall.

In contrast, people saw Labour as “the best bet for those wanting to keep closer ties with our European neighbours”, the researchers found, with the party winning remain votes from not just the Conservatives but also the more obviously pro-EU Liberal Democrats and Greens.

Noting that the Brexit debate by the time of the election was less about whether to leave the EU than how best to do it, the study found Labour took nearly two-thirds of 2015 Green votes, and about a quarter of Lib Dem ones.

One question, about whether it was more important for the government to protect access to the single market or get full control of immigration, showed answers clearly split across party lines.

Labour had a lead of more than 40 percentage points with voters seeking the first priority, with a similar margin for the Tories among those who favoured the latter option.

A series of polls of the panel ahead of the election uncovered how crucial the few weeks of the campaign proved in boosting Labour’s final result.

A pre-election survey in April and May found the Conservatives had a lead over Labour of 41% to 27%, but by the final days of the campaign this had turned into a virtual dead heat.

While the “churn” of voters – those who switched parties during the campaign – was similar to the 2015 election at 17% of votes, and slightly less than at the 2010 and 2005 elections, the primary difference was that in 2017 the switch mainly favoured Labour.

In 2015, Labour and the Conservatives both took about 25% of the late-moving votes, whereas in June, 54% went to Labour and just 19% to the Conservatives.

The authors said: “According to our data, the main reason that Labour gained so much in the campaign at the expense of the other parties is the strong performance of Jeremy Corbyn, especially relative to Theresa May.”