Ownership of a patent for technology to detect HIV levels in patients' blood was correctly split between Stanford University and the pharmaceutical giant Roche, the Supreme Court ruled Monday.

By a 7-2 vote, the high court upheld a lower court's decision making the company and the university co-owners of a patent for technology in HIV test kits.

Stanford asserted it owned the technology because its discoverer worked there. The 1980 Bayh-Dole Act allows universities to retain rights to research funded by federal grants.

But Stanford researcher Mark Holodniy also signed a contract that gave Roche the patent to anything that resulted from their collaboration. The U.S. Circuit Court of Appeals for the Federal Circuit made Roche and Stanford co-owners, and the high court agreed.

"Nowhere in the Act are inventors expressly deprived of their interest in federally funded inventions," said Chief Justice John Roberts, who wrote the majority opinion.

Justices Stephen Breyer and Ruth Bader Ginsberg dissented.

"I cannot so easily accept the majority's conclusion — that the individual inventor can lawfully assign an invention (produced by public funds) to a third party, thereby taking that invention out from under the Bayh-Dole Act's restrictions, conditions and allocation rules," Breyer said.

The case is Stanford University v. Roche, 09-1159.