The first flight bearing 180 of Costa Rica’s estimated 8,000 stranded Cuban migrants will leave for El Salvador next week in the first phase of a new plan to address what has become a Central America-wide migrant crisis. Costa Rican officials announced Wednesday the flight will bring the migrants Monday to El Salvador, where they will be provided with ground transportation to the Guatemala-Mexico border and given 20-day transit visas for their journey to the United States, TeleSUR reported.

The plan comes amid mounting pressure on Costa Rica to shelter thousands of migrants en route to the U.S. who were stranded there after Nicaragua closed its borders. An agreement was struck late in December among Costa Rica, El Salvador, Guatemala, Mexico and the United Nations International Organization for Migration to begin flying the migrants out of Costa Rica, though ensuing flights will not be scheduled until the success of the test flight is gauged.

The Central American nations have seen a surge in Cuban migrants making the trek from Ecuador to Mexico after the improved relations between Cuba and the U.S. sparked fears that preferential U.S. asylum rights for Cubans will soon cease. Cubans who touch ground in the U.S. are allowed to legally stay in the country, unlike other migrants.

Migrants A Cuban migrant speaks on her mobile phone at a shelter for Cuban migrants on the Costa Rican border in Paso Canoas, Panama, Dec. 23, 2015. Hundreds Cubans were stranded on the border after the government of Costa Rica decided not to give them more transit visas. Photo: REUTERS/Juan Carlos Ulate

Costa Rican officials said the flight and ground transportation will cost each migrant $535, and they will have to find their own route onward to the U.S. border after reaching Mexico.

“It’s important to remember that these migrants left their country voluntarily,” Roland de Wilde, the Costa Rica director for the U.N.’s International Organization for Migration, told media Wednesday. “In Mexico they will surely find the transportation options that they want. I understand there are many options in Mexico.”

But skeptics have criticized the plan for not doing enough to ensure the migrants’ safety, calling the lack of planning after they reach Mexico a “black hole.”

“Just having a visa doesn’t make them immune to the same dangers faced by Central American migrants,” Everard Meade, director of the University of San Diego’s Trans-Border Institute, told the Tico Times of San Jose, Costa Rica.