Groups involved in campaigning for same-sex marriage and abortion in Northern Ireland have welcomed plans to introduce the measures there.
Westminster MPs supported an amendment to introduce same-sex marriage by 383 votes to 73, while the abortion amendment was backed 332 to 99.
Under the legislation, the British government will extend marriage equality to Northern Ireland and legislate for abortion by October 21st, unless devolution is restored.
Elections were last held there in March 2017, and efforts to form a new executive have repeatedly stalled.
The proposal to legalise same-sex marriage was put forward by Labour MP Conor McGinn, who is originally from south Armagh but is an MP for St Helen's North.
WE DID IT !!!!!
The House of Commons has voted by a massive majority to introduce same-sex marriage in Northern Ireland if the Stormont Executive isn’t restored by 21st October.
Thank you to @Love_EqualityNI & the thousands of people who have campaigned for equal marriage. pic.twitter.com/TDalAw1VIg
— Conor McGinn MP (@ConorMcGinn) July 9, 2019
Amnesty International said the Westminster vote marked "huge progress" for the rights of Northern Irish citizens.
Patrick Corrigan is Amnesty International's Northern Ireland director, and part of the Love Equality coalition.
He said: "This is an incredible moment and a huge cause for celebration. Marriage equality in Northern Ireland is finally a reality.
"For more than five years, same-sex couples in the rest of the UK have been able to get married whilst this right has been denied to citizens in Northern Ireland.
"Now, in just three months' time, we could see the first same-sex couples here tying the knot.
"So many people have been campaigning for this for so long. At points it seemed unachievable, but we never gave up.
"Today's a day for the history books."
.@ConorMcGinn MP will never have to buy his own pint ever again in the 🏳️🌈 bars of south Armagh (or indeed anywhere else in Northern Ireland). I’m getting him started on the Commons terrace. pic.twitter.com/otLfDGMJ26
— Patrick Corrigan (@PatrickCorrigan) July 9, 2019
SDLP leader Colum Eastwood said: "Today is a good day for Northern Ireland and for our LGBT+ community.
"After decades of discrimination, intolerance and abuse, often at the hands of the state, we have at last taken a step toward recognising the love of LGBT+ people as equal to that of anyone else. This is a watershed moment."
"It is a matter of profound regret for me as an MLA and as a party leader that we haven't yet been able to deliver marriage equality in an inclusive, powersharing executive.
"I am delighted, however, that we now have an equality backstop that will ensure the rights of LGBT+ people are delivered either here or at Westminster."
Mr Eastwood added: "I want to place on record my sincere thanks to Conor McGinn for the immense amount of work he has undertaken to make this happen.
"We have been working with Conor on this issue for some time and it's incredible to see a result."
The abortion amendment was put forward by UK Labour MP Stella Creacy.
After the vote, she said: "Thank you to everyone who today stood up for equality in Northern Ireland - whether for same sex marriage or abortion, today we have said everyone in the UK deserves to be treated as an equal."
"There's a road to go yet but today [is] a big step forward".
— stellacreasy (@stellacreasy) July 9, 2019
Grainne Teggart, Amnesty International's Northern Ireland campaign manager, said: "This is a significant defining moment for women's rights in Northern Ireland.
"The government must now put into law the recommendations from CEDAW, which includes the decriminalisation of abortion.
"The grave harm and suffering under Northern Ireland's abortion regime are finally coming to an end.
"At a time when prosecutions are still a grim reality, this cannot happen quickly enough."
While UK Labour Party leader Jeremy Corbyn said: "Equality should know no borders. Parliament has changed lives today."
Main image: (Left to right) Fergal McFeran, Declan Meehan, Jen Ashton and Alexa Moore - members of the LGBT community - celebrate at the Maverick Bar in Belfast, as same-sex marriage in Northern Ireland came a step closer after MPs voted to legalise it if a new Stormont executive is not formed by October | Image: Peter Morrison/PA Wire/PA Images