The migrants are seeking asylum in the U.S. and travel first by boat or plane to Latin America.
The result is makeshift camps, like this one in the town of Peñas Blancas, where people are living with scarce resources.
"I’m seeing that we are living in hell because there isn't water here for a person to bathe," an African migrant said.
The migrants typically don't carry any identification, so it's difficult to deport them. And it would cost the Costa Rican government a lot of money to detain or deport that many people.