The SDLP and Alliance are preparing themselves for some tough questions on the Westminster campaign trail after a number of abstentions by MLAs from both parties saw a proposal to legalise same-sex marriage narrowly defeated last night.

49 MLAs voted against the Sinn Féin proposal with 47 voting for. But it was the decision of five SDLP MLAs – 36 per cent of the party’s Assembly group – and three Alliance MLAs – 37.5 per cent of the Stormont team – to abstain that proved the key factor in foiling a fourth attempt to bring the law here into line with the UK.

As the final week of the general election campaign draws near, both parties have been highly critical of Health Minister Jim Wells, who is due to step down from his post next month after an inflammatory outburst at a hustings event in Downpatrick and an extraordinary verbal altercation with a lesbian couple in Rathfriland.

The parties hope that putting clear blue water between them and the DUP over a key equality issue will help their candidates in the battle for floating voters in some of the north’s most closely-fought constituencies. The battle for votes is particularly frantic in South and East Belfast, where the outgoing MPs, SDLP leader Alasdair McDonnell and Alliance deputy leader Naomi Long, are waging rearguard actions to save their seats. But the Assembly’s rejection of marriage equality on the back of SDLP and Alliance abstentions is a blow to more progressive elements in the parties who

The DUP voted en bloc to oppose the motion while Sinn Féin voted unanimously to support it. Only two other parties were fully behind the proposal – the Greens and NI21, although both parties have just one MLA. The UUP Assembly group had just one dissenting voice – South Belfast MLA Danny Kinahan voted in favour of marriage equality.

Both the main parties were quick to fall on the apparent disarray in the ranks of their rivals. DUP Chief Whip Peter Weir MLA said: “For some of those parties who position themselves as the champions of same-sex marriage, today’s debate simply highlighted their own internal difficulties. There is always a question as to whether we should be concerned for the wellbeing of several SDLP MLAs who just happen to go missing when such a debate is taking place. Similarly, despite the supposed fulsome support of the Alliance Party, three of the MLAs today could not bring themselves to vote in support.

“For all their talk about equality, in both the SDLP and Alliance, it seems that all members are not equal when it comes to same sex marriage.”

Alliance MLA Chris Lyttle said during the debate his party supports equality for all “regardless of age, gender, disability, race, ethnicity or sexual orientation and to stand against discrimination or stigmatisation of any kind”.

He added: “The Alliance Party therefore supports the extension of state provided civil marriage to same sex couples, provided that robust legislative protection can uphold the religious freedom of faith groups to define and practice religious marriage as they determine.”

SDLP MLA Colum Eastwood told the chamber: “We need, as an Assembly and as people in positions of power and responsibility, to be seen to be embracing all members of our community – all members of our community.

“There is no reason whatsoever, Mr Speaker, why the north of Ireland should be the only place on these islands that doesnt have marriage available to same sex couples.”

Sinn Féin MLA Megan Fearon said: “Sinn Féin is committed to the promotion of equality and challenging homophobia, racism, sectarianism and all forms of discrimination.”

She added: “Progressive MLAs in the Assembly must make it clear in the chamber that homophobia is completely unacceptable”