MEXICO CITY — Sorry, we have too many troubles of our own.

That was the gist of a message that Mexico’s Foreign Relations Ministry sent on Monday in announcing that it had no choice but to withdraw the help it had offered to Texas to deal with the flooding left by Hurricane Harvey.

After Mexico’s strongest earthquake in living memory struck on Thursday night, killing 96 people and devastating parts of Oaxaca and Chiapas States, and Hurricane Katia swept ashore early Saturday, causing mudslides and flooding, the foreign ministry said all help was needed at home.

The ministry also noted that shelters in Houston were beginning to close and said that after talking with Texas officials, it was clear that the state’s need for help had diminished.