Wales will become the first country in the UK where people will be presumed to have consented for their organs to be donated unless they opt out.
The current system, which operates across the UK, relies on people signing up to a voluntary scheme and carrying a donor card.
But ministers in Cardiff Bay, keen to drive up low transplant rates, say the new scheme will save countless lives.
A Bill for Wales to adopt a system of presumed consent passed its final stage in the Welsh Assembly - despite objections from religious groups on moral grounds as well as concerns about it adding greater distress to bereaved family members. AMs voted in favour of the Bill by 43 votes to eight, with two abstentions.
Ministers insist the scheme will be implemented sensitively - saying they will launch a major publicity drive so people are fully informed about which choice to make.
The Bill was not likely to have been defeated as the 30-strong Labour group in the Assembly was whipped to vote in favour. Conservative and Plaid Cymru AMs were given a free vote, and the Lib Dems said all five of their AMs backed the opt-out system.
The new law is set to come into force in 2015 - after the Welsh Government has launched a two-year £8 million public campaign - and has been described as a historic event by the British Medical Association (BMA).
The BMA's secretary in Wales Dr Richard Lewis said: "This is the most important piece of legislation created in Wales since the laws of Hywel Dda. A few years ago, Wales was ready to lead the UK on banning smoking in public places, but we didn't have the necessary legal powers. This time we are delighted that our National Assembly has shown the rest of the UK the way forward and fully support its implementation. Patients across the country will now benefit directly or indirectly from this Bill."
The Welsh Government has long said there is a desperate need to drive up transplantation rates - with 226 people in Wales waiting for a transplant - and hope it would increase donors by around a quarter.
The new consent law would mean that people would have to choose not to donate their organs and would apply to over-18s who die in Wales if they have lived in the country for more than 12 months. Organs made available under the system would be the same as the "opt-in" method - including kidneys, heart, liver, lungs and pancreas - and would not only go to donor patients in Wales. They could go anywhere in the UK.