MPs have voted resoundingly to extend both same-sex marriage and access to abortion to Northern Ireland, bringing the region into line with the rest of the UK on two of the most significant social issues of the era.

The Commons voted 383 to 73 to pass the same-sex marriage amendment to a largely technical bill on the stalled Northern Ireland assembly, tabled by the Labour MP Conor McGinn, a longstanding campaigner for equal marriage in Northern Ireland.

In a subsequent vote MPs approved an amendment by another Labour MP, Stella Creasy, to extend abortion rights to Northern Ireland, the only part of the UK where it remains illegal. The vote was passed by 332 to 99.

Both second reading amendments were free votes for MPs, as they were viewed as a matter of conscience.

Before the votes, the Northern Ireland minister John Penrose said the government would honour the results of both measures despite ministerial doubts. “Should this pass it will go into law,” he said. “It will become part of primary legislation. And so ministers will be bound by it and the government will proceed.”

The government has long argued that both issues are devolved matters and should not be imposed on Northern Ireland by Westminster. But McGinn and Creasy say the fact the assembly and executive have been suspended since January 2017 amid political deadlock means action must be taken.

McGinn’s amendment would theoretically lead to an automatic change in the law within three months if the devolved government remains stalled. If and when the region’s executive is revived, it can then approve or repeal the measure.

McGinn told the Commons the house had “failed LGBT people in Northern Ireland before” by not extending rights in a timely way.

He said: “Tonight, we have the chance to do the right thing. People in Northern Ireland, and indeed across Britain and Ireland, are watching. I, for one, am not going to let them down. I hope colleagues do not let them down either.”

But Penrose said that while Conservative MPs had a free vote, everyone should “tread extremely carefully” given the potential complications, not only of imposing the change but also issues such as resultant changes to pensions.

The amendment was “a significant proposal, both in terms of its importance and its complexity”, Penrose said. “It’s not something that can be delivered without a careful consideration and analysis of whether we’re getting it right.”

It might not be possible to change the law within three months, he said, adding: “While I appreciate and sympathise with what the honourable gentleman is trying to achieve here, I would just issue a note of warning to anybody who is considering voting for this.”

It later emerged Penrose voted in favour of McGinn’s amendment.

He had also issued a warning about the technical complications of passing Creasy’s amendment, known as new clause 10.

“Regardless of how people may be minded to vote on the underlying principle, I think that there are real and genuine concerns about the technical effectiveness of new clause 10,” Penrose said.

The Guardian