The constitutional guarantee that a defendant be able to confront his accusers means prosecutors must produce even the technicians involved in the specific laboratory tests used in his trial, the Supreme Court ruled Thursday.

In a case involving a drunken driver from New Mexico, a majority of the court reinforced its recent decisions that fortified the right of defendants to cross-examine witnesses, established in the Sixth Amendment.

The rulings have scrambled the court’s usual ideological pairings, with Justices Antonin Scalia and Ruth Bader Ginsburg the most vigorous defenders of defendants’ rights in such circumstances.

Ginsburg wrote Thursday’s opinion, which said defendant Donald Bullcoming should have had the opportunity to cross-examine the lab analyst who provided the main evidence in his trial: a lab report showing his high blood-alcohol level. New Mexico prosecutors instead had called another analyst who had no role in performing the specific test.

“The Sixth Amendment does not tolerate dispensing with confrontation simply because a court believes that questioning one witness about another’s testimonial statements provides a fair enough opportunity for cross-examination,” Ginsburg said.

Scalia and Justices Clarence Thomas, Sonia Sotomayor and Elena Kagan agreed with the decision, but only Scalia joined Ginsburg’s opinion in full.

The case was considered a test of how the newest justices — Sotomayor and Kagan — would view the court’s changing jurisprudence on the constitutional right “to be confronted with the witnesses against him.”

For years, the court allowed the testimony of an absent witness if the judge found the statements reliable. But in the 2004 case Crawford v. Washington , the court said that testimony from an absent witness can be accepted only if the witness is unavailable and if the defendant had an opportunity to cross-examine.

Five years later — over objections from four justices who said the requirement would grind the criminal justice system to a halt — the court ruled that even laboratory reports could not be admitted without, as Ginsburg put it, “a live witness competent to testify to the truth of the statements made in the report.”

Thursday’s case was about who the live witness should be.

Ginsburg said it should be the person who prepared the report. She rejected the finding of the New Mexico Supreme Court that the machine that calculated Bullcoming’s blood-alcohol level was his real accuser and that the technician who recorded its findings was a “mere scrivener.”

But Ginsburg wrote that the analyst was called up to certify that “he received Bullcoming’s blood sample intact with the seal unbroken, that he checked to make sure that the forensic report number and the sample number corresponded and that he performed on Bullcoming’s sample a particular test, adhering to a precise protocol.” Such “human actions” are appropriate for cross-examination.

Sotomayor wrote separately to indicate that she might not be as strict as Ginsburg and Scalia and that perhaps a supervisor who had some connection to the test might be an acceptable witness.

Justice Anthony M. Kennedy wrote the dissent, again objecting to the court’s “serious misstep of extending” its decision two years ago.

He said that the “hollow formality” of requiring a witness to testify in court about a lab report has strained prosecutions. In New Mexico, he said, the state’s 10 analysts have received 200 subpoenas each from defense attorneys.

“Scarce state resources could be committed to other urgent needs in the criminal justice system,” Kennedy wrote. He was joined by Chief Justice John G. Roberts Jr. and Justices Stephen G. Breyer and Samuel A. Alito Jr.

Ginsburg said the same arguments have been offered since the court began its more rigid interpretation of the confrontation clause. “The sky has not fallen,” she said.

The case is Bullcoming v. New Mexico.