The Northern Ireland Assembly in Belfast has voted for the first time in favour of legalising gay marriage by a majority of just half a per cent.
But because of a voting mechanism introduced by the Democratic Unionist Party (DUP), the law will not be changed.
This is the fifth time the assembly at Stormont has voted on the legalisation of gay marriage in Northern Ireland - and the first time a majority has backed the proposals.
The DUP tabled a "petition of concern" at the start of the debate in Parliament Buildings, Belfast. It meant the proposal could only succeed if enough unionist and nationalist members of Northern Ireland's legislative assembly backed it.
While not enough unionists voted yes, the slim overall majority of 50.5% in favour has been welcomed as a symbolic victory by campaigners for same sex marriage in Northern Ireland.
Following a yes vote in the same sex marriage referendum in the Republic of Ireland this summer, Northern Ireland became the only part of the British Isles where civil marriage is not an option for same sex partners.
Amnesty International welcomed the vote, but there has also been criticism of the actions of the DUP.
It shows that, slowly but surely, politicians are catching up with public opinion here, which has been in favour of equal marriage for same sex couples for some years. However, the abuse of the petition of concern, to hold back rather than uphold the rights of a minority group, means that Stormont has once again failed to keep pace with equality legislation elsewhere in the UK and Ireland.
Ruth Hunt, the chief executive of Stonewall, tweeted her frustration over the result.
Before the crucial vote, Catholic bishops in Northern Ireland had issued a warning against legalising same sex marriage.
They wrote: "Those who vote in favour of this motion have no way of knowing what the full consequences of such a vote will be. The truth about marriage derives from its intrinsic nature as a relationship based on the complementarity of a man and woman and the unique capacity of this relationship alone to generate new life. This truth does not change with the shifting tides of historical custom or popular opinion."