NUEVO LAREDO, Mexico — When a group of migrants staying in a shelter in this border city heard last weekend that Hurricane Harvey was barreling down on Texas, they did not wait. They saw an opportunity to ford the Rio Grande and slip into the United States, using the storm as cover.

There were about 20 in that group, said Aarón Méndez Ruiz, the pastor whose shelter, Casa del Migrante Amar, is a gathering spot for those heading north. The migrants, men from Central America and Mexico, had disclosed their plans to him privately and then left in groups of three and four, carrying water jugs. He didn’t know whether they had crossed successfully: It typically takes about 10 days for people to check in, he said.

“The moment that Harvey happened, they said, ‘We’re going. Pastor, we’re going to take our chances.’”

On the Mexican side of the border, the devastation caused by Hurricane Harvey looked somewhat different. While there was plenty of concern for the victims and awe at the destructive power of the storm, some sensed opportunity and crossed the border, hoping immigration agents would be redeployed or distracted, and many more wondered whether they could make money by helping Texans rebuild after the water recedes.