Supreme Court nominee David H. Souter concluded his testimony before the Senate Judiciary Committee yesterday virtually assured of Senate confirmation after impressing a number of committee members with what they described as surprisingly moderate views during three days of wide-ranging questioning.

Souter, who turned 51 yesterday, endorsed the Supreme Court's one-person, one-vote ruling, said there is no constitutional ban on the death penalty and agreed that a New Hampshire law permitting school prayer violated the Constitution.

But in contrast to his testimony last week, which included a few heated exchanges with liberal senators, Souter's testimony seemed almost anticlimactic, with senators at times more intent on lecturing the nominee on what his approach should be on the court than eliciting information from him.

"We didn't bake a cake, but perhaps we will let you go home after today, and that will be an even better gift," said Sen. Orrin G. Hatch (R-Utah) at the beginning of the federal appeals judge's third and final day of testimony before the committee. By 7:15 p.m. -- 20 minutes before he finally finished -- Sen. Paul Simon (D-Ill.) was calling it "the longest birthday party you have ever had."

After President Bush's first nominee to the court was done, Sen. Joseph R. Biden Jr., (D-Del.), the committee chairman, thanked Souter for his testimony and called it a "tour de force."

As he did last week, Souter avoided confrontration, disarming senators by acknowledging that if he were placed in some situations again, he might do things differently.

Questioned about his record as New Hampshire attorney general, Souter said he believed it was a mistake for the state to accept $74,000 from the Public Service Company of New Hampshire, the owner of the Seabrook nuclear power plant, to help defray the cost of prosecuting anti-nuclear demonstrators there.

Souter said he did not solicit the funds or discuss the prosecution with the company. Asked by Sen. Howard M. Metzenbaum (D-Ohio) whether he should have told then-Gov. Meldrim Thomson Jr. that the money should be returned, Souter agreed.

"Yes, I think that would have been an appropriate position to take, and I wish I had taken it," he said.

Souter, whose career as a prosecutor and state judge gave little indication of his ideology or judicial philosophy on controverisal issues such as abortion, emerged in his testimony as potentially more moderate than many observers had expected. At times he clearly perturbed some conservative senators on the panel with his answers about the role of federal courts.

But his carefully crafted answers and his refusal to discuss abortion rights and certain other aspects of the right to privacy also left him in many ways as much of an enigma as before the hearings.

Sen. Charles E. Grassley (R-Iowa) told Souter that some of his testimony seemed "more like the terminology likely to come from a judicial activist."

Biden told Souter, "You're giving us all some mild reassurance as my more conservative friends seem to doubt" your views on constitutional interpretation.

"He comes through as a moderate," said Sen. Herbert H. Kohl (D-Wis.) "The question is how do you square it all" with his previous record.

From conservatives such as Grassley and Sen. Gordon J. Humphrey (R-N.H.), Souter heard pleas against judicial activism and in favor of recognizing the fetus as a person entitled to constitutional protection. Liberals such as Sens. Edward M. Kennedy (D-Mass.) and Patrick J. Leahy (D-Vt.) urged him not to thwart congressional will in construing civil rights statutes and suggested the difficulties that would arise for women if Roe v. Wade were overruled.

Returning once again to the issue of privacy rights, a focus of the hearing, Souter said he did not know whether unmarried people, as opposed to married couples, enjoy a fundamental constitutional right of privacy that protects their use of contraceptives.

"One of the questions . . . that would have to be asked . . . is not merely the weight to be given the privacy interest to be asserted, but the weight to be given the state interest in asserting the right to preclude people under the circumstances from obtaining contraceptive information and devices," he said. "I do not think that is a simple question to answer."

The court in a 1972 opinion by Justice William J. Brennan Jr., whom Souter would replace if the Senate confirms him, struck down a law prohibiting the distribution of contraceptives to unmarried persons. It did so largely on equal protection, rather than privacy, grounds, although the court referred to the right of privacy as "the right of the individual, married or single" to be free from government intrusion into reproductive decisions.

Discussing the impact if the court were to overrule Roe, which relied on that 1972 case and other privacy rights decisions, Souter said, "I don't suppose there is any more moving example . . . that whatever the court does . . . thousands of lives will be affected, and that fact must be appreciated."

He also said "everyone assumes that if there were a successful attack on Roe v. Wade, that would then call into question prior privacy cases."

Souter's testimony yesterday also touched on a number of topics not covered by the panel last week.

He told Biden that he thought the Supreme Court was correct in ruling that federal courts have the power to hear apportionment disputes and to impose the requirement of one-person, one-vote.

Although he thought a dissent in the reapportionment case, Baker v. Carr, was "very powerful," Souter said, "I think I would have to have gone along with" the majority ruling.

He also said the court was correct when, following the Brown v. Board of Education decision in 1954, it outlawed segregation in public schools in the District even though the 14th Amendment guarantee of equal protection applies only to states.

Robert H. Bork, whose Supreme Court nomination was defeated by the Senate in 1987, took a different position on both issues.

Souter said he disagreed with the position taken by Justices Brennan and Thurgood Marshall that the constitutional ban on cruel and unusual punishment prohibits imposition of the death penalty in all instances. "I think that would be an unsupportable decision under the Constituion," Souter said.

Asked by Metzenbaum whether the court has the obligation to enforce constitutional rights even if they protect unpopular causes or activities such as flag burning, Souter replied: "If that were not the case, there would be no point in having a Bill of Rights. . . . We would leave the entire issue to whatever majoritarian impulse there might be at the time."

Although he was quoted while attorney general as saying he would do everything he could to uphold a state law permitting school districts to require elementary students to recite the Lord's Prayer, Souter said that had he gotten to the point of taking an actual position, "I don't think we could have found a defensible basis for it. . . . I think we would have to have admitted that there was a constitutional deficiency."

Souter defended an opinion he wrote while on the New Hampshire Supreme Court that evidence of a rape victim's "sexually provocative" behavior earlier on the evening of the attack had been improperly excluded from the trial. He said that although the state's rape shield law does not allow evidence of a victim's previous sexual activities, the behavior in question had occurred "sufficiently close in time" to the alleged rape that it was relevant.

Souter received the endorsement of the American Bar Association.