ON A sweltering Sunday afternoon in Old Montreal, the first of dozens of people began arriving at Quebec’s immigration department armed with folding chairs. They were intent on being near the front of the queue the next morning, September 17th, when the province’s government began accepting the first of only 750 applications for private citizens to sponsor refugees. The fact that Montrealers were prepared to sit outside all night to bring in more refugees shows why François Legault, leader of the Coalition Avenir Québec, has tripped up on the path to victory in the election for the provincial parliament on October 1st.

After almost 15 years of a Liberal government, Quebeckers are open to change. The Coalition’s promise not to support independence means that for the first time in a generation voters who want to remain in Canada do not have to choose the Liberals, the only big party in Quebec that favours staying in. Mr Legault has come unstuck with his populist impulse to back a plan to cut immigration by 20% from 52,000 last year, subject immigrants to a language and values test and expel those who fail it.

His supporters are divided. The promise is popular in rural areas where there are few immigrants. But in the Montreal region, where immigrants account for 23% of the population, it has gone down badly. That may derail the Coalition’s chances of winning seats in an area which returns 27 of the assembly’s 125 members. It is also unpopular with businesses, which need workers to fill around 90,000 vacancies. Other party leaders derided the plan during a televised debate on September 17th. Philippe Couillard, the Liberal leader and current premier, asked whether immigrants would be dumped on a bridge between Quebec and Ontario.

Mr Legault may have thought he was on firm ground in a province where protecting the French language and culture has been a defining issue since the British conquest in 1759. Immigration has become more of a concern in Canada since asylum-seekers began ignoring official channels by walking across the border with the United States. Almost 35,000 have come since January 2017, most of them to Quebec. Justin Trudeau, the Liberal prime minister, was heckled on a recent visit to the province by a woman asking who would pay for the border-crossers. The Conservatives, the official opposition in the national parliament, though not in Quebec, call it a crisis. Maxime Bernier, a former Conservative MP from Quebec, recently created the People’s Party of Canada to oppose “extreme multiculturalism” among other things.

As many Quebeckers appear not to share his views on immigration, Mr Legault is losing ground. Polls show that his party, once apparently heading for a majority, may be lucky to form a minority government. Back at the immigration department, Ali and Taherah, an elderly Canadian couple originally from Iran, are tired but cheerful after a long wait to apply to bring their son and his family to Canada. Ali says the political debate is removed from reality. He has found Quebeckers to be welcoming to newcomers. Mr Legault may have fatally over-estimated the strength of anti-immigrant sentiment in the province.

Correction (September 20th, 2018): An earlier version of the story misquoted the man identified as Ali. The end of the final paragraph has been changed to correctly reflect his views.