Researchers have discovered a massive coral reef in the muddy waters of the Amazon River.

The international team made the discovery on a 2012 expedition to the Amazon plume, where the river’s fresh water empties into the Atlantic Ocean near northeastern Brazil, but their findings were published Thursday in the journal Science Advances.

University of Georgia Sponge collected during the 2012 expedition.

The primary goal of the trip was to research how the plume influences the way that the ocean absorbs carbon dioxide, University of Georgia oceanography and climate change professor Patricia Yager told The Atlantic.

But one scientist on the team, reef ecologist Rodrigo Moura, had other ideas.

“He pulls out this paper from 1977, saying these researchers had managed to catch a few fish that would indicate reefs are there. He said, ‘Let’s see if we can find these,’” Yager told the outlet.

Moura’s instincts were correct. The researchers used sonar to figure out which areas they wanted to investigate more closely, then dredged up samples from the ocean floor. They believe the reef, which lies between 164 and 329 feet deep, covers about 5,900 square miles.

University of Georgia The instincts of Rodrigo Moura that such a reef existed were spot on.

"We brought up the most amazing and colorful animals I had ever seen on an expedition," Yager said in a University of Georgia statement. Those animals included sea fans, brightly colored-fish, yellow and red sponges and pink coral-like crusted algae, National Geographic reports.

Scientists were surprised to find such a thriving reef in areas with no light and low levels of oxygen.

"We found a reef where the textbooks said there shouldn't be one,” study co-author Fabiano Thompson told National Geographic.

The published study explores the relationship between the river movement and the reef, and how the reef transforms from one location to the next.

“In the far south, it gets more light exposure, so many of the animals are more typical reef corals and things that photosynthesize for food,” Yager said. “But as you move north, many of those become less abundant, and the reef transitions to sponges and other reef builders that are likely growing on the food that the river plume delivers. So the two systems are intricately linked."

Researchers have gathered more samples of the reef’s inhabitants since 2012, including brittle and basket stars, huge sponges and 73 different species of fish. However, the strong currents and muddy water have prevented researchers from diving down to see the reef firsthand.

Lance Willis The plume where the water from the Amazon River meets the water of the Atlantic Ocean.

The discovery comes in a week marked by devastating reports that 93 percent of the Great Barrier Reef off the coast of Australia is nearly dead.

However, the Amazon reef may also be in danger, particularly from industrial oil exploration. The Brazilian government has sold a significant amount of land to companies for oil exploration, some of which encompasses the reef.

“From ocean acidification and ocean warming to plans for offshore oil exploration right on top of these new discoveries, the whole system is at risk from human impacts,” Yager said.

Correction: A previous version of this article misidentified the first image as coral. It is a sponge.