Hundreds of people celebrated outside parliament as lords voted overwhelmingly in favour of same-sex marriage.

The gay, lesbian, bisexual and transgender supporters cheered and danced after peers voted 390 to 148 against an amendment to the bill which would have derailed the government’s plans to legalise gay marriage.

‘This is an amazing victory to enjoy after we were told we were going to lose,’ Ben Summerskill, director of gay rights charity Stonewall, told Metro.

‘We have heard vile language over the past few days with comparisons to paedophilia and incest but the majority of lords have shown they are in tune with the public in the 21st century.’

MPs have already backed the bill despite opposition from dozens of Conservative backbenchers.

The bill will now go on to a committee and report stage before a final reading stage in the lords.

Critic: Archbishop of Canterbury Justin Welby (Picture: AFP/Getty)

Former BBC director general Lord Birt said: ‘This brave bill brings us one historic step closer to a better world and I wholeheartedly support it.’

And Labour’s Lord Alli paid tribute to the prime minister for showing a ‘huge amount of personal courage’ in pressing ahead with the bill.

But the Archbishop of Canterbury said introducing gay marriage would ‘abolish’ the existing institution and replace it with a weaker option. The Most Rev Justin Welby said the plans would be ‘neither equal nor effective’.

And Lord Dear – the peer behind the attempt to scrap the bill at second reading – warned that the ‘ill-considered bill seeks to overturn centuries of tradition, heedless of public opinion and the views of religious leaders, and blind to the laws of unintended consequences’.

The government hopes that the bill will become law by the summer of 2014.