Jeremy Corbyn has challenged Nicola Sturgeon to support a minority Labour government after dismissing her calls for a progressive alliance to thwart the Tories in Westminster.

Corbyn said Labour was “not doing pacts, not doing deals” if it failed to win a majority in the election, rejecting suggestions fuelled by Sturgeon that he had privately agreed to support a second independence referendum in exchange for Scottish National party support.

“I’m not in favour of it at all because I think the priorities for Scotland are in ending poverty, inequality and injustice, and independence would bring with it an economic problem for Scotland,” he said.

Corbyn said if there was no majority the SNP would have a choice of backing a Labour budget and legislative programme or allowing the Tories to resume power.

“It’s for the SNP to choose: if the SNP wants to put the Tories back in office and have the numbers to do it after the election – their choice,” he said.

“Do they really want to impose on the people of Scotland more years of austerity, more poor children, more homeless people? More housing shortage? More lack of investment? Or are they going to support a Labour government which invests for the future of Scotland? It’s their choice.”

Corbyn’s two-day campaign visit to Scotland got off to a rocky start after he was forced to clarify his stance on a second independence vote and twice faced heckling from onlookers at campaign events who accused him of being “a terrorist sympathiser” over his position on conflicts in Northern Ireland and the Middle East.

In his first media interview in Glasgow, Corbyn told the PA news agency that a Labour government would not agree to an independence referendum in its first term, contradicting his recent stance that it could agree to one after two to three years in power.

Corbyn suggested Labour would ignore Sturgeon’s calls for the powers to stage a vote even if the SNP won a majority of seats in Scotland. But Labour aides said the party’s position could change if the SNP again won a majority of seats in the 2021 Holyrood elections.

Speaking several hours later to reporters in the constituency of Coatbridge, Chryston and Bellshill, where Labour is defending a 1,586 majority, Corbyn claimed the media were confused about Labour’s stance. He said the party’s position was clear: “We will not countenance an indy referendum in the early years of a Labour government, because our priorities would be elsewhere.”

Sturgeon hit back at Corbyn’s refusal to offer a deal to win SNP support at Westminster, insisting that unless he agreed to authorise a Scottish independence vote at a time set by the Holyrood, he could forget about getting help from the SNP in the Commons.

“‪I won’t help him in power, to get into power, to stay in power if he doesn’t accept the principle that whether there is a referendum in Scotland and what the timescale of that referendum should be, should be determined by the people of Scotland,” she said.

Polls suggest Labour could lose up to five of the seven Scottish seats it won in 2017. A recent YouGov poll put its support as low as 12%, trailing behind the SNP on 42%, the Tories on 22% and the Liberal Democrats on 13%.

Labour officials accept the party is being squeezed by the Tories on Brexit and the SNP on independence, and are braced for the loss of several seats. Labour sources and activists say Corbyn’s popularity among voters has plummeted since 2017. One candidate said the leader’s name was “utterly toxic” on the doorsteps.

Other Labour sources are extremely pessimistic and believe they may save only two Scottish seats – Edinburgh South, which was won by Ian Murray with a 15,000 majority in 2017, and either East Lothian, which it won by 3,083 votes in 2017, or Coatbridge, Chryston and Bellshill.

They said perceptions about Corbyn’s hostility towards Israel, his pro-republican stance in Northern Ireland and his ambivalence over Brexit had damaged his standing.

Corbyn was confronted in the target seat of Glasgow North West by a Church of Scotland minister, the Rev Richard Cameron, who accused him of being a “terrorist sympathiser”.

Corbyn was wearing a bright tartan scarf, and Cameron said to him: “I thought you’d be wearing your Islamic jihad scarf.” The church said it would investigate any complaints about Cameron’s behaviour.

Corbyn was also heckled by three Orange Order members in Hamilton, who said they had stopped voting Labour as soon as he became leader.

Standing close to Corbyn’s campaign bus in Hamilton waving a union flag, Mary Duckett, 71, said: “In this election I’m undecided but I certainly won’t be Labour. I have been Labour since I was 18 years of age.”

Claiming Corbyn had spoken at pro-IRA events, she added: “I don’t trust him. He’s a terrorist sympathiser.”

Corbyn was cheered in Hamilton by several dozen 17-year-old students from Holy Cross school, many of whom said they would vote Labour if they could.

Jack Burns, a modern studies and politics student, said Corbyn was authentically socialist and represented Labour’s roots. “The SNP has done very little to tackle inequality, whereas Jeremy Corbyn is actually wanting to help the working class,” he said.