In a move that represents a defeat for the Bush administration, the Supreme Court on Tuesday upheld Oregon’s physician-assisted suicide law.

Voting 6 to 3, justices ruled that the federal government does not have the authority to override the 1997 Oregon law. The administration improperly tried to use a drug law to prosecute Oregon doctors who prescribe overdoses, the majority opinion said.

The administration has been pushing since 2004 to overturn the law and punish doctors who help terminally ill patients die. Former Attorney General John Ashcroft brought the case forward in 2004 shortly before his resignation. His replacement, Alberto Gonzales, has been pursuing the case since.

The Oregon law, which has resulted in 200 deaths, covers only extremely sick people. At least two doctors must agree that they have six months or less to live and are of sound mind. The case has drawn interest following the death of Terri Schiavo last year. She remained in a coma in nursing homes for more than 10 years as her husband and parents fought over her right to die.

Voting with the majority were justices Anthony M. Kennedy, Sandra Day O’Connor, John Paul Stevens, Stephen Breyer, David Souter and Ruth Bader Ginsburg. Dissenting justices were Antonin Scalia, Clarence Thomas and John Roberts, the newest member of the court.