WASHINGTON - Prisoners do not have a constitutional right to DNA testing after their conviction, the Supreme Court ruled yesterday, even though the technology provides an “unparalleled ability both to exonerate the wrongly convicted and to identify the guilty.’’

In the court’s first examination of how to treat the rapidly evolving field of biological testing, Chief Justice John G. Roberts Jr. wrote for a majority that said it is up to the states and Congress to decide who has a right to testing that might prove innocence long after conviction.

The “challenges DNA technology poses to our criminal justice systems and our traditional notions of finality’’ are better left to elected officials than federal judges, Roberts wrote in the 5-to-4 decision.

“To suddenly constitutionalize this area would short-circuit what looks to be a prompt and considered legislative response,’’ he wrote.

The case was one of the most anticipated of the term, given the revolutionary role DNA testing has played in modern criminal proceedings. The Innocence Project, a group representing those who say they have been wrongfully convicted, said such testing has exonerated 240 people nationwide, at least 17 of whom had received the death penalty.

Dissenting justices, led by Justice John Paul Stevens, said the right to postconviction DNA testing should not depend on the widely varying laws enacted by the states. Allowing a prisoner to test DNA evidence at his own expense would “ascertain the truth once and for all,’’ Stevens wrote.

He was joined in dissent by Justices David Souter, Ruth Bader Ginsburg, and Stephen Breyer.

The case at hand comes from Alaska, one of three states without a law allowing postconviction access to biological evidence. The others are Massachusetts and Oklahoma.

William Osborne was convicted of the 1993 rape and assault of a prostitute in a secluded area near the Anchorage International Airport. Osborne wanted to pay for a more discerning test of semen found in a condom at the crime scene, which prosecutors agree would almost definitively prove his guilt or innocence. But prosecutors refused to allow the test, and Alaska courts agreed he did not qualify under the procedures they had established.

Osborne appealed to the federal courts, and the US Court of Appeals for the Ninth Circuit in San Francisco recognized a right to such testing under the Due Process Clause of the Constitution.

But Roberts, joined by Justices Antonin Scalia, Anthony Kennedy, Clarence Thomas, and Samuel Alito, said that was wrongly decided.

“A criminal defendant proved guilty after a fair trial does not have the same liberty interests as a free man,’’ he wrote, and thus states have more “flexibility’’ in deciding procedures for postconviction relief.

The majority said Alaska’s procedures seemed sufficient and there was no reason for federal courts to “leap ahead’’ of the states.

Peter Neufeld of the Innocence Project, who argued the case before the court, said the decision will mean that “more innocent people will languish in prison’’ because they lack the legal right to DNA testing.

“Some state statutes are simply inadequate,’’ he said, noting that the patchwork of state and federal laws regarding testing means some prisoners will be unable to gain access to testing that would prove them innocent.

Even within the court’s narrow decision on Osborne, there were divisions within the two sides. Alito and Kennedy would go further than Roberts, holding that anyone who waived DNA testing at trial for tactical reasons has no right to pursue it after conviction.

Souter declined to join the other dissenters in recognizing a constitutional right to the testing. He said he would rule for Osborne simply because Alaska’s procedures for obtaining access to DNA evidence were insufficient.

© Copyright 2009 Globe Newspaper Company.