MEXICO CITY — President Trump’s State of the Union speech hit hard on a topic that has dominated his term in office: defending the border with Mexico against what he described as migrants in “large organized caravans.”

He also suggested that the Mexican authorities were encouraging the migrants to cross the border illegally.

“We have just heard that Mexican cities, in order to remove the illegal immigrants from their communities, are getting trucks and buses to bring them up to our country in areas where there is little border protection,” Mr. Trump said in his speech Tuesday night.

Some aspects of Mr. Trump’s assertions are true but others are unsubstantiated or distorted. There is no evidence, for example, that the Mexican authorities are sending migrants to weak points along the border.

Migrants have said they have banded together in large groups, called caravans, because such groups help keep them safe from robberies and other dangers along the trek north through Mexico. But their size has drawn the president’s anger and made them one of his frequent targets.

As the migrants from Central America have moved north through Mexico, city and state governments have sometimes provided transport with help from churches and local aid groups.

Some small-town mayors opt to do this because they have limited resources, and it is easier to arrange transport than to house and feed several thousand people at a time. Some state governments provided this type of aid along parts of the route migrants traveled last October and November on their way to Tijuana, a busy border crossing station with the United States.

The stated purpose of the action is humanitarian, and women and children are given priority when space is short.

Mr. Trump was most likely referring to recent action taken by the state government of Coahuila, across the border from Texas. On Monday, Coahuila officials, with help from local businesses, provided buses for 1,700 members of a migrant caravan that left Honduras on Jan. 14.

The state government posted on Twitter photos of Coahuila Gov. Miguel Riquelme meeting with migrants the night before their journey and then visiting a temporary shelter set up to receive the migrants in Piedras Negras, just across the border from Eagle Pass, Texas.

The migrants were driven five hours from Arteaga, in southern Coahuila, to Piedras Negras, which has a population of more than 150,000 and does not fit the definition of a remote unprotected border area.

There is no indication that the transport provided by cities or states is deliberately targeted at areas lacking border protection. On the contrary, the Mexican authorities prefer to help migrants reach border cities with adequate shelter space.

Mexico’s federal government is not providing transport of any sort to migrants.

In a statement on Tuesday, Kirstjen M. Nielsen, Mr. Trump’s homeland security secretary, said that the government was prepared for the caravan’s arrival.

“Illegal entry will not be tolerated, and we stand ready to prevent it,” she said. “The Department of Homeland Security (DHS) has been working with the departments of State, Defense and Justice to ensure all possible resources are available to address this lawless caravan.”

Most of the migrants have said that they hope to apply for asylum in the United States through legal routes.