Get breaking news alerts and special reports. The news and stories that matter, delivered weekday mornings.

President Donald Trump claimed credit for the sidelining of the large migrant caravan that he had complained about on Twitter.

“I have just heard that the caravan coming up from Honduras is broken up and Mexico did that and they did it because frankly, I said you really have to do it," Trump said Tuesday at the White House.

Struggling in part with the enormous logistical hurdle of trying to get more than 1,000 people across hundreds of miles, organizers of the monthlong march told the Associated Press that they'd never really intended to reach the U.S. border in the first place. The group is stalled in the Oaxaca region, according to the AP, "with no means of reaching the border."

Let our news meet your inbox. The news and stories that matters, delivered weekday mornings. This site is protected by recaptcha

Mexican authorities said in a statement late Monday that they were offering protections to some of the migrants — the majority of whom are from Honduras, according to Buzzfeed — and deporting others. By late Monday, the government said they had deported 400 already.

The president had tweeted Tuesday morning that the caravan "had better be stopped" before reaching the U.S. By lunchtime, he was claiming victory.

"We’re going to have to include security in NAFTA,” he said, referring to the trade agreement he's called a "cash cow" on Twitter and suggested tying to immigration reform. "So, that’ll be good."

The group of more than 1,000 men, women, and children marching from Central America toward the United States promising to seek asylum made headlines on Sunday and Monday when the president falsely complained on Twitter that the hundreds of likely asylum seekers were seeking DACA protections and creating a dangerous situation. (No undocumented immigrant crossing the U.S. border now would be eligible for protections under the Obama-era Deferred Action for Childhood Arrivals program.)

The march was organized by a group called Pueblo Sin Fronteras, or People Without Borders, which said in a release they are seeking refuge from violence and corruption.

Buzzfeed reported that some caravan members still intend to try and reach the United States.

Mexican authorities were quick to note that they were following their own laws by respecting the demonstration, and that it wasn't their job to police the United States' border.

“It is not the responsibility of the Mexican government to make immigration decisions for the United States or any other nation,” said the joint statement from the government's foreign and interior ministries.