WASHINGTON — Human genes may not be patented, the Supreme Court ruled unanimously on Thursday. The decision is likely to reduce the cost of genetic testing for some health risks, and it may discourage investment in some forms of genetic research.

The case concerned patents held by Myriad Genetics, a Utah company, on genes that correlate with an increased risk of hereditary breast and ovarian cancer. The patents were challenged by scientists and doctors who said their research and ability to help patients had been frustrated.

After the ruling, at least three companies and two university labs said that they would begin offering genetic testing in the field of breast cancer.

“Myriad did not create anything,” Justice Clarence Thomas wrote for the court. “To be sure, it found an important and useful gene, but separating that gene from its surrounding genetic material is not an act of invention.”