LONDON — British lawmakers voted overwhelmingly on Tuesday to legalize same-sex marriage and extend abortion rights in Northern Ireland as long as the region’s governing coalition remained paralyzed, setting the stage for changes that would bring the region into line with the rest of the United Kingdom.

The votes do not in and of themselves change the law in Northern Ireland. Both issues are traditionally within the realm of the regional government there, but its governing coalition collapsed in 2017, creating a power vacuum that remains unfilled.

Members of Parliament in London argued that as long as the deadlock persisted, they had an obligation to step in.

Lawmakers on Tuesday night voted 383 to 73 in favor of legalizing same-sex marriage, and 332 to 99 in favor of extending abortion rights. The government cautioned that putting the changes into law would be complicated, and the abortion measure did not explicitly state how it would expand abortion rights.