President Trump said Sunday his administration is focused on preventing a caravan of at least 5,000 Central American migrants heading north in Mexico from reaching the US border. He vowed that if the migrants have not been registered as asylum seekers, they would be turned away at the border.

"Full efforts are being made to stop the onslaught of illegal aliens from crossing our Souther (sic) Border. People have to apply for asylum in Mexico first, and if they fail to do that, the U.S. will turn them away. The courts are asking the U.S. to do things that are not doable!" Trump tweeted Sunday.

Trump blamed the situation on the opposition party for not supporting tougher anti-immigration measures. "The Caravans are a disgrace to the Democrat Party. Change the immigration laws NOW!"

Homeland Security Secretary Kirstjen Nielsen said in a statement Sunday that the U.S. was "closely monitoring the situation" and that her agency would work with its partners in the region to "investigate and prosecute to the fullest extent of the law" anyone seeking to "encourage and profit from irregular migration." The statement noted that transnational criminal groups often prey on such migrants.

Thousands of Central American migrants, primarily from Honduras and Guatemala, pressed north through Mexico toward the U.S. border on Sunday. Mexican President Enrique Nieto has said throughout the past week that his country would seek to register the migrants and process requests for asylum. Mexico’s Interior Department said it had received just 640 refugee requests by Hondurans in the caravan.

[More: Caravan migrants in limbo as UN, Mexico negotiate]

Many of the migrants have said they gave up trying to use the legal process to enter Mexico because the process was too slow. A big group of migrants who grew impatient burst through a Guatemalan border fence and worked their way around a border gate and crossed into Mexico on Friday. The caravan has been shadowed by Mexican authorities, but have so far not been stopped.