TONY ABBOTT, Australia’s prime minister, has never wanted for slogans on his tough stand against migrants and asylum-seekers. A refrain to “stop the boats” heading to Australia from Indonesia helped him win an election two years ago. In May, to suggestions that Australia might resettle Rohingya and Bangladeshi migrants from Asia, he replied: “Nope, nope, nope.”

Yet on September 9th Mr Abbott did something surprising. He announced that Australia would take in 12,000 Syrians, in addition to its current annual refugee quota, and provide A$44 million ($30 million) for thousands more sheltering in Lebanon, Turkey and Jordan. Women, children and families from “persecuted minorities”, he said, would take precedence. His conservative Liberal-National coalition government also said Australia’s air force would extend strikes against Islamic State targets in Iraq to those in Syria.

Mr Abbott claimed both decisions were linked by the region's “humanitarian and security crisis”. But his apparent about-face on refugees caused the bigger surprise. Days earlier, Mr Abbott had insisted that if Australia took any migrants from Syria, they would have to fall within the country’s annual intake of 13,750 people (a figure his government had already cut from 20,000, under the former Labor administration). And conservatives in Mr Abbott’s Liberal Party had reportedly wanted them limited mainly to Christians.

But the sheer numbers of Syrians fleeing war and seeking refuge in Europe has struck a chord with ordinary Australians. Germany’s decision to accept all Syrians arriving there was particularly potent. Images of the crisis touched off political pressures at home, including from within Mr Abbott’s own party, that seemed to wrong-foot the prime minister. Craig Laundy, a Liberal parliamentarian, pleaded with the government to “please do more” after he was moved by the image of Aylan Kurdi, a three-year-old Syrian boy, found drowned on a Turkish beach. Thousands of Australians held candle-lit rallies on September 7th supporting calls from other politicians and humanitarian groups for Australia to take in large numbers of Syrian people.

Mr Abbott now argues that turning back migrants in boats has allowed the government to take control of its policy from people-smugglers. He said the admissions from Syria reflect “Australia’s proud history as a country with a generous heart”. That claim may have a different ring for 1,580 boat travellers, including 87 children, still being held in Australian-run detention centres on Manus Island, in Papua New Guinea, and in the Pacific island nation of Nauru. The Refugee Council of Australia, an NGO, estimates that about 30 Syrian asylum-seekers are still detained in such camps; some have been there for more than two years.

The council has denounced Mr Abbott’s hard line on migrants who arrive by boat. But Tim O’Connor from the council calls the intake from Syria a “huge shift” in the government’s stand. He ascribes it partly to mounting sympathy for desperate migrants among Australians following the Rohingya crisis in May. Mr Abbott has been out of step with public opinion on several issues, and could not risk remaining so on this one: an opinion poll this week showed the government trailing the Labor opposition by eight points; an election is only a year away.

If Australia’s shift was also partly motivated by concerns that it would seem an outlier in the West on the migrant issue, it has highlighted another one in the region: last year Japan accepted a mere 11 asylum-seekers, despite a record number of over 5,000 applicants. Amnesty International, a watchdog, has singled Japan out, along with Russia, Singapore and South Korea, as examples of wealthy countries that have offered “zero resettlement places”. Pressure from other quarters is bound to follow.