The Labour front bench’s confused response to yesterday’s vote on the Immigration Bill shows its attempt to hedge all sides of the chaotic Brexit debate can only result in a failure to effectively stand up for migrants’ rights. Voters, party members and backbenchers alike have made clear they want to see Labour present a robust challenge to the government’s damaging bill. It’s high time the leadership heard them and plotted a course that avoids embarrassing mistakes such as these.

There is so much wrong with the UK immigration system as it stands, and much need for reform, but this bill will serve only to worsen conditions for migrants – particularly EU nationals and their family members. This bill not only ends freedom of movement, but allows the home secretary to implement a future system for immigration with little oversight from parliament.

The recent immigration white paper confirms that there will be no significant effort to make the system fairer, more transparent or less dangerous. And analysis of the government’s “settled status” scheme suggests that hundreds of thousands will be left without documentation, just as the Windrush generation were when the right to free movement from the Commonwealth came to an end. If allowed to pass, the bill will bring EU nationals into an immigration system that is dysfunctional and chaotic – exposing them to the arbitrary cruelty of the “hostile environment”.

It should have been a no-brainer for the Labour front bench to vote against the bill and to whip its MPs to do the same. With the numbers in parliament so finely balanced, the last-minute lurch to instruct MPs to vote came too late, meaning that 76 Labour MPs were absent. The bill passed by just 63 votes.

Support free-thinking journalism and attend Independent events

It was a brilliant opportunity for Labour to send a message to the government that our current immigration system is not fit for purpose. There is space to improve the rights of all migrants, but this cannot be done, and never has been, through a strategy that seeks to pander to anti-migrant sentiment. The only way is to make the positive case for migration.

Despite Labour’s conflicted history on migrant rights, Jeremy Corbyn and Diane Abbott – whose voting records are impeccable – are the two politicians you’d expect to get a decision like this right. Perhaps this is why it is so disappointing to see such disarray on the front benches last night. The Labour leadership’s commitment to ending free movement, which in effect will level down the rights of EU nationals, has done nothing for fairness, and simply plays into the narrative that migrants are a problem. An abstention can only be viewed as conceding this point, and sacrificing people’s right in the process.

What transpired from yesterday’s debacle is that while the Labour leadership may still be conflicted in its position on the end of freedom of movement, party members and many Labour voters are not. The eventual U-turn was put in play only once the public, and significant numbers of backbench MPs from the Conservatives, Labour, SNP, the Lib Dems and the Greens, expressed their outrage at the frontbench hesitation to take a firm stance.

As the bill progresses through parliament and beyond, it’s vital that Labour begins to seriously make the positive case for a better, rights-based immigration system for all after Brexit. People will move: that is a fact of life. But our treatment of migrants is not set in stone. We’re not yet at the point of no return, but we’re circling it dangerously. At a minimum, they must seek to drastically scale back the powers that this bill grants the government.

A better approach would be to improve rights for non-EU nationals alongside protecting the rights of EU nationals. During the debate there was huge support for an end to indefinite detention and for an end to the minimum income requirements which tear families apart. There is opportunity for these to succeed – if Labour is to get its act together and get behind them.