Shabana Mahmood will press on with hardline immigration policies despite calls for a reversal from unions and left-leaning Labour MPs after the Green party’s byelection victory.

Senior Labour sources insisted that the home secretary would continue to roll out changes to asylum policy, dismissing as “plain wrong” claims that it would further alienate Muslim voters.

Andrea Egan, the general secretary of Unison, the biggest Labour-affiliated union, called on Friday for the government to change course and defend “migrants and refugees” after the party came third behind Reform UK in Gorton and Denton, Greater Manchester.

Diane Abbott, the independent MP for Hackney North and Stoke Newington, told the Guardian that Labour should “turn to more progressive policies on issues such as immigration and asylum”.

But a party source said Mahmood would not learn “the wrong lessons” from the byelection. “The idea that we are losing Muslim voters over immigration is plain wrong,” a party source said.

Mahmood insisted on Friday that Labour would push on with the changes: “The levels of illegal migration are putting immense strain on our country, and our public services – creating division within communities across the country.

“Illegal migration is undermining the contract between government and its citizens – eroding support for the asylum system entirely.”

Mahmood will argue next week that migration policies – including forcing people to wait 20 years before being able to claim leave to remain – were entirely consistent with Labour values.

In a speech delivered at a thinktank, she will warn Labour MPs that the future of the party will be “in jeopardy” unless it supports “controls on the level of migration” to limit pressure on local communities.

She will also set out her vision for an asylum system to “restore order at the border and bear down on illegal migration”. Mahmood is expected to say that she supports neither the Green party’s “open borders” policy or the “nightmare” offered by Nigel Farage.

Labour sources have pointed to polling from More In Common showing that a majority of Labour and Green voters supported many of Mahmood’s proposals.

In November, MPs, peers and refugee organisations expressed deep concerns after she announced that refugee status was to become temporary, with those whose countries become safe being made to go home.

Under a system introduced by the last Labour government in 2005, refugees can apply for indefinite leave to remain after five years, providing access to benefits and public funds and a route to citizenship.

Last week, Mahmood visited Denmark to see how its centre-left Social Democratic party had tackled migration using hardline policies.

Before 2015, refugees in Denmark were allowed to stay for five to seven years, after which their residence permits would become permanent.

But the rules changed when more than 1 million people arrived in Europe fleeing conflict and repression, largely from Syria, Afghanistan, Iraq and Eritrea.

Since then, temporary residence permits have been granted only for one or two years at a time and there is no longer any guarantee of a permanent visa. To gain permanent status, refugees have to be fluent in Danish and are required to have had a full-time job for several years.

Mahmood said: “Denmark shows us how to be firm but fair: removing the incentives that draw illegal migrants to their borders while providing refuge to those in genuine need.

“That is why we will follow the Danish model to restore order and control to our borders.”