The terminally ill adults end of life legislation passed by a vote of 314-291, clearing its biggest parliamentary hurdle.

The United Kingdom’s parliament has voted in favour of a bill to legalise assisted dying for terminally ill people, paving the way for the country’s biggest social change in a generation.

On Friday, 314 members of parliament voted in favour and 291 against the bill in the House of Commons, the UK’s lower chamber of parliament.

The bill will go on to Parliament’s upper chamber, the House of Lords, where it will undergo months of scrutiny, but while there could be changes to the bill, the Lords will be hesitant to block a bill that has been passed in the Commons.

The “Terminally Ill Adults (End of Life)” law would give mentally competent, terminally ill adults in England and Wales with six months or less left to live the right to choose to end their lives with medical help.