The vote of 46-28 was the final legislative step, endorsing an earlier vote by the lower house last November.
``I hereby declare the proposal adopted,'' said Chairman Frits Korthals Altes, after two days of debate.
An estimated 10,000 people gathered outside in one last show of discontent. Many sang hymns and quoted the Bible, then marched silently past the building where Senate debated the proposal.
The bill is likely to take effect this summer.
The law formalizes a practice discreetly used in Dutch hospitals and homes for decades, turning guidelines adopted by Parliament in 1993 into legally binding requirements.
Those guidelines presuppose a long doctor-patient relationship, and exclude the possibility of euthanasia for nonresidents of the Netherlands.
Before the vote, Health Minister Els Borst gave a final assurance that the supervisory provisions guaranteed the law could not be abused by doctors and protected patients from unwanted euthanasia.
Outside the parliament building, some protesters stood masked in black balaclavas and carried oversized syringes dripping with blood-red liquid. Others gathered signatures for a petition that already had 25,000 names before the debate opened Monday evening.
Several Christian schools canceled classes to allow students from across the country to participate in the demonstrations.
``We don't have the right to decide about matters of life and death, but God does,'' said 19-year-old Henrico van der Hoek as he walked passed Parliament. ``As Christians, we simply cannot support this law.''
In the weeks preceding the debate, the upper house was swamped with an unusual amount of mail--about 60,000 urging the bill to be killed.
Despite the strong showing of opponents on Tuesday, van der Hoek, who belongs to the Dutch Reformed Church, admitted he is one of a small minority in the Netherlands, once a stronghold of Christian politics.
Borst rejected domestic and international criticism that the bill gives doctors too much power to decide over a patient's life.
``There are sufficient measures to eliminate those concerns,'' Borst told the senators. Euthanasia, she said, will remain a last resort for those who have no other choice but endless suffering.
Under the law, a patient would have to be undergoing irremediable and unbearable suffering, be aware of all other medical options and have sought a second professional opinion. The request would have to be made voluntarily, persistently and independently while the patient is of sound mind. Doctors are not supposed to suggest it as an option.
The new law also would allow patients to leave a written request for euthanasia, giving doctors the right to use their own discretion when patients become too physically or mentally ill to decide for themselves. An independent commission would review cases to ensure the guidelines were followed.
If a doctor is suspected of wrongdoing, the case will be referred to public prosecutors for review and possible punishment.
Several countries--Switzerland, Colombia and Belgium--tolerate euthanasia. In the United States, Oregon has allowed doctor-assisted suicide for the terminally ill since 1996, but its law is more restrictive than the Dutch bill.
In Australia, the Northern Territories enacted a law in 1996, but it was revoked in 1997 by the federal parliament.
The drafters of the Dutch bill denounced a plan from Australia's leading euthanasia campaigner to set up a floating clinic in a ship flying the Dutch flag off the coast.
Dr. Philip Nitschke had said if the Dutch legalize euthanasia he would offer clients lethal injections in international waters off the Australian coast.
Borst said the Dutch government would do ``whatever it could'' to counter any such effort and stressed that the scheme ``could by no means'' fit into the Dutch rules.