Every day in Costa Rica, wastewater and trash from homes and businesses flow into the Tarcoles River, which spits tires and plastic into the nearby mangroves.

However, 2,000 American crocodiles have evolved to dwell in the toxic river, which is a testament to the nation's prolonged struggle with waste management.

The enormous reptiles don't seem to be bothered by the 150 different varieties of bacteria that s have been found in the river as they lounge in the sun and occasionally eat fish that swim up the river from the sea.

​"The Tarcoles River is the most polluted river in Costa Rica, and one of the most contaminated in Central America. Heavy metals, nitrites, nitrates, and a large amount of human waste can be found," Ivan Sandoval, a biologist with the National University of Costa Rica, said.

"It is a super-contaminated area, but this has not affected the crocodile population," he added.

After decades of hunting and habitat loss, the International Union for Conservation of Nature (IUCN) estimates that just around 5,000 of the crocodile species - found in 18 countries - remain in the world.

The Crocodylus acutus is classified as "vulnerable," by the organization, but its numbers have increased in recent years. Costa Rica's people are "healthy and robust"

Sandoval sees the carnivores as "living fossils" capable of surviving in harsh environments.

​"They haven't had to change anything in millions of years, they are perfectly designed."

The crocodile population in Costa Rica "are recovering," according to Sandoval, who also warns against the danger posed by visitor activity.

Foreign tourists who take boat tours to observe the reptiles up close are attracted to the river's crocodiles.

Sandoval worries about the animals becoming too accustomed to being around people because some people feed the animals, which is against the law.

The 48-year-old captain of one of the tour boats, Juan Carlos Buitrago, claims that he and other residents frequently remove hundreds of tires and plastic trash from the ocean.

He enjoys the river's wildlife, including the macaws that soar overhead at dusk, but he wishes his countrymen would quit contaminating his "office".

​According to the UN's environmental agency, Costa Rica boasts remarkable environmental credentials, with one-third of its land designated for protection, 98 percent renewable energy, and 53% forest cover.

However, like in the case of the Tarcoles River, the legislation is not often strictly followed.

Walter Brenes, a lawyer and environmentalist, remarked that all of Costa Rica's rules and regulations "do not solve the problem"

He stated that the country requires "real public policy that is completely aimed at protecting wildlife."