Delegates at the party’s conference in Brighton overwhelmingly supported plans to “maintain and extend free movement” – which gives European Union citizens the right to live and work in Britain and vice versa – even after the UK leaves the bloc.

Jeremy Corbyn had previously said only that freedom of movement would be “open for negotiation” after Brexit, following a backlash from member states to its 2017 manifesto commitment to end the scheme.

Labour backs radical plans to reduce Britain’s carbon emissions to net zero by 2030

Labour pledges to halve food bank usage within its first year in government

Labour conference 2019: pick of Tuesday’s fringe events

But the motion, put forward by campaign group Labour for Free Movement, commits the party to a stronger stance, which includes “campaigning for free movement, equality and rights for migrants” and says it will “maintain and extend” movement rights.

The call, put to delegates on morning, also commits the party to abolishing detention centres, dismantling the Conservative’s ‘hostile environment’ immigration policy and scrapping limitations on migrants’ access to public funds.

“Free movement, equality and rights for migrants are socialist values and benefit us all,” the text of the motion reads.

“Confronted with attacks on migrants – from the racist Hostile Environment to the Conservative’s Immigration Bill that plans to end free movement and strip the rights of working-class migrants – we stand for solidarity, equality and freedom,” it adds.

In another major overhaul to current rules, the motion commits the party to extending voting rights to all foreign nationals who are residents in the UK.

Under the existing system, only British, Irish and Commonwealth citizens are allowed to vote in general elections and referendums, while EU citizens and foreign nationals are restricted to voting in local and European elections.

While the Labour leadership are not bound to include the commitment in their next manifesto, a party source said “policy passed by conference becomes party policy”.

Ana Oppenheim from Labour for Free Movement said: “This is a transformational policy – it sends a clear, unequivocal message of solidarity, that we are the party of all workers, regardless of where they are born.

“In 2017, it was a source of shame for many activists that our manifesto included ending free movement. Now we can move forward not only committed to defending free movement, but to giving migrants to vote. If we win, the next election will be the last election in which people like me are shut out of the democratic process.”

But the plans drew criticism from Home Secretary Priti Patel, who said: “Jeremy Corbyn does not believe in any limits on immigration.

“Corbyn’s Labour even wants to extend free movement to more countries and allow potentially dangerous illegal immigrants to roam our streets.”