Pope Francis has called on Central American nations Costa Rica and Nicaragua to resolve the Cuban migration problems in the region. Thousands of Cubans are stranded in the border of the two countries after Nicaragua refused the migrants to pass their territory.

"My thoughts turn in this moment to the many Cuban migrants who find themselves in difficulty in Central America, many of whom are victims of human trafficking," Pope Francis said during his Sunday Blessing in front of thousands of people at the Vatican's St. Peter's Square, per Wall Street Journal.

"I invite the countries of the region to renew with generosity all necessary efforts in order to find a rapid solution to this humanitarian drama," he added. In a report by BBC, the number of Cubans trying to make their way to the United States through Central and South America by land started to increase after the U.S. and Cuba agreed to begin restoring relations last December 2014.

The special immigration policy is called "wet foot, dry foot," which allows Cubans to apply for U.S. residency if they arrive by land while those who are caught crossing the border at sea will be sent back to Cuba. Pope Francis played a key role in the current migration policy after visiting the two countries last September and is scheduled to visit Ciudad Juárez, Mexico, where he will likely talk about migration issues.

According to Reuters, many more migrants have fled Cuba as the fear of the current U.S. asylum rights for Cubans may soon end. About 5,000 Cuban migrants are stuck in Costa Rica's territory after Nicaragua declared last November that they will stop admitting migrants that are making their way to the U.S. by land.

Many of the migrants flew away from Cuba to end up in Ecuador as the country does not require Cubans to have visas. However, Ecuador has since changed its visa policy for Cuban migrants. They then traveled north to Colombia, then Panama and Costa Rica, where they were stopped in the Nicaraguan border.

Nicaragua, a known ally of Cuba, proposed last week that migrants should be airlifted straight to the U.S. and accused Costa Rica of dumping Cubans in their territory. The accusation has led to a tension between the two nations.

The Costa Rican government has insisted that a "humanitarian corridor" should be created to allow the Cubans to continue their journey to the U.S. They are also convincing Belize and Guatemala to allow the migrants to go through their country before entering Mexico.