Central American officials have reached a deal to allow the first of thousands of stranded Cuban migrants to continue their journey north toward the United States.

The Costa Rican Foreign Ministry says in a statement that the first humanitarian transfer will airlift Cuban migrants from that country to El Salvador in January. From there they will continue by bus toward Mexico.

No more details were immediately released by the governments of Costa Rica and of Guatemala, which hosted a diplomatic meeting Monday to consider the issue.

The number of Cubans stranded in Costa Rica has reached at least 8,000 since neighboring Nicaragua closed its border to them weeks ago. Islanders who reach U.S. soil are nearly always allowed to stay under the country's uniquely favorable migratory policies for Cubans.