LINCOLN, Neb. (AP) — The Nebraska Supreme Court ruled Friday that electrocution is cruel and unusual punishment, outlawing the electric chair in the only state that still used it as its sole means of execution.

The state's death penalty remains on the books, but the court said the Legislature must approve another method to use it. The evidence shows that electrocution inflicts "intense pain and agonizing suffering," the court said.

"Condemned prisoners must not be tortured to death, regardless of their crimes," Judge William Connolly wrote in the 6-1 opinion.

"Contrary to the State's argument, there is abundant evidence that prisoners sometimes will retain enough brain functioning to consciously suffer the torture high voltage electric current inflicts on a human body," Connolly wrote.

The first execution by electrocution was in 1890 in New York, and it quickly became the dominant means of capital punishment across the country. Today lethal injection is the preferred method in most states, and the nine states that still allow electrocution use it only as an option or backup.

There are conflicting views on whether federal courts might agree to hear an appeal. Attorney General Jon Bruning said he will ask the state court to reconsider its decision, and his spokeswoman Leah Bucco-White said, "We're exploring all our options."

Gov. Dave Heineman's spokeswoman, Jen Rae Hein, said he is considering introducing a bill this legislative session to replace electrocution with lethal injection.

"I am appalled by the Nebraska Supreme Court's decision," Heineman said in a statement. "Once again, this activist court has ignored its own precedent and the precedent set by the U.S. Supreme Court to continue its assault on the Nebraska death penalty."

The high court made the ruling in the case of Raymond Mata Jr., convicted for the 1999 killing and dismemberment of 3-year-old Adam Gomez of Scottsbluff, the son of his former girlfriend.

Investigators testified that parts of the toddler's body were found at Mata's home in a freezer, a dog bowl and dog-food bag. Human bone fragments also were recovered from the stomach of Mata's dog.

Nebraska Solicitor General J. Kirk Brown had argued for the state that the legal standard a method of execution must meet is to minimize the risk of unnecessary pain, violence and mutilation, not eliminate it. He said electrocution meets that test.

But the high court said electrocution "has proven itself to be a dinosaur more befitting the laboratory of Baron Frankenstein" than a state prison.

Jerry Soucie, Mata's attorney, said he was "really surprised the lengths they went to lay out in detail what's wrong with electrocution."

Nebraska's last execution was in 1997. Ten inmates are on the state's death row; one of them, Carey Dean Moore, was to have been electrocuted in May but the state Supreme Court stopped it less than a week before his scheduled date because of the case it ruled on Friday.

The state changed its method last year to one 20-second jolt of 2,450 volts, instead of four shorter shocks.

The court stressed that its ruling did not strike down the death penalty — just electrocution as the method. Approving another method, however, could prove difficult.

Past attempts to replace electrocution with lethal injection in Nebraska have failed, largely due to the efforts of the Legislature's staunchest opponent of capital punishment, Sen. Ernie Chambers of Omaha.

Chambers pointed out Friday that a bill to replace execution would have to be approved by the Judiciary Committee. That's unlikely, he said, given that on Thursday the committee sent to the full Legislature a bill that would repeal the death penalty.

"It would be stupid and a waste of time and strictly for political purposes to introduce a bill to replace electrocution with lethal injection," Chambers said.

Last year, a state bill to repeal the death penalty failed after first-round debate by just one vote. Bills must go through three rounds before they get final approval.

The use of the electric chair began to decline when Oklahoma adopted lethal injection in 1977, said Richard Dieter, executive director of the Death Penalty Information Center. Since 1976, when executions resumed following a U.S. Supreme Court ban, there have been 154 electrocutions and more than 900 lethal injections, Dieter said.

Tennessee performed the country's most recent execution by electrocution in September.

Alabama, Arkansas, Florida, Illinois, Kentucky, Oklahoma, South Carolina, Tennessee and Virginia still allow electrocution, but some of those states do not allow newly condemned inmates to choose it. Some of the states have the electrocution method on the books just in case lethal injection is ruled unconstitutional.

Nebraska's high court said electrocution violated the Nebraska Constitution rather than the U.S. Constitution, a move Dieter said appeared to shield its decision from federal review. But Chief Justice Mike Heavican wrote in dissent that the majority's stated reliance on Nebraska's constitution is misleading because the court based its decision entirely on federal precedent.