Ecuador will begin requiring Cubans to get visas to enter beginning Tuesday, saying it wants to discourage a flow of migrants.

Deputy Foreign Minister Xavier Lasso said Thursday that Ecuador wants to curb the movement of migrants who have used Ecuador as a transit country to reach other nations without permission.

He said such migration is risky and "puts at risk men, women and children."

The announcement comes after a meeting in El Salvador where Central American and other officials, including Ecuador's foreign minister, discussed the plight of 3,000 U.S.-bound Cuban migrants who are stranded at the border between Costa Rica and Nicaragua.

The vast majority of those Cubans started their journey in Ecuador, which until now has allowed any foreigner to enter without a visa.