All of the gay couples who applied to wed on the first day gay marriage is legal in New York will be able to do so.

The new law comes into power on Sunday and as the city can only cope with so many ceremonies officials ran a lottery to determine who could wed on the day.

It was predicted that register offices around the city could cope with 764 couples but when 823 couples – 59 more – signed up, officials decided to accommodate them all.

More than 530 couples have asked to wed at the city’s Manhattan register office. Officials said the venue would stay open until all couples had been served.

Usually couples must wait 24 hours to wed after applying for a marriage licence. However, more than 60 judges have volunteered to hold on-the-spot hearings to waive the waiting period.

This means that couples will arrive, get their marriage licence, have the waiting period waived and then have their ceremonies.

New York legalised gay marriage last month,

Five other states – Massachusetts, Connecticut, Iowa, New Hampshire and Vermont – and the District of Columbia – currently allow gay couples to marry.