A team from Montana is taking home $1.5 million after triumphing in the Wendy Schmidt Ocean Health XPRIZE, a two-year-long competition to create an accurate, affordable way to autonomously test the acidity of ocean waters.

Sunburst Sensors, a Missoula-based company that came out of a University of Montana business incubator, won the top prizes for both accuracy and affordability — $750,000 each. The company's device takes in samples of seawater and mixes them with a special dye that changes color at different pH levels, then shines a laser through the water onto a sensor to take a reading. Sunburst's unit could cost as little as $1,000 per device.

Related: Bleaching Poses a Threat to Hawaii's Coral Reefs, Scientists Say

"The ocean is in the midst of a silent crisis as a result of increasing levels of CO2, with a direct impact on our climate, marine creatures, and on communities that rely on shellfish, fisheries and coral reefs," said Wendy Schmidt, whose foundation funded the competition, in the XPRIZE news release. "I am delighted that the innovations coming out of this competition will meet the needs of scientists helping us to understand better how connected our life is to the health of the ocean."

Second-place awards went to ANB Sensors for affordability and Team DuraFET for accuracy, with each team taking home $250,000. A dozen other teams from all over the world competed for the prize. More information on the goals and challenges of the Ocean Health XPRIZE can be found here.