NILTEPEC, Mexico (Reuters) - An impoverished Mexican town nearly flattened by a 2017 earthquake welcomed thousands of tired and hungry Central Americans in a U.S.-bound caravan this week in quiet defiance of U.S. President Donald Trump’s condemnation of the group.

Slideshow ( 12 images )

On Monday, the same day that Trump ordered 5,200 troops to the U.S.-Mexico border to block the migrants, residents of the southern town of Niltepec, who still live among piles of rubble that once were their homes, prepared for the caravan with homemade soup, medical tents, and diapers for children.

“We wish we had a space dignified enough to offer our visitors,” said Zelfareli Cruz Medina, Niltepec’s mayor.

As she spoke, caravan members were stringing up garbage bags to use as tents in Niltepec’s main square. Surrounding buildings were scarred with cracks and gaping holes caused by the 8.2 magnitude earthquake that struck the region on Sept. 7, 2017.

Of 1,720 homes in Niltepec, 1,602 were damaged in the quake, according to town officials, while 530 collapsed entirely. At least 100 families are still without homes, they said.

A tower atop Niltepec’s main church was stripped down to its fragile wood skeleton by the quake and Cruz said the town needed help to rebuild its library and the mayor’s offices, which were serving as a shelter for the caravan’s women and children.

But a willingness to help the needy comes as almost second-nature to residents of the hardscrabble town in Oaxaca, one of Mexico’s poorest states, Cruz said. “We know now what it means to suffer,” she said.

Near the church, three local families gathered at lunchtime in the shared backyard of rebuilt homes to cook an offering of chicken soup for the migrants, many of whom have said they are fleeing violence and grinding poverty in their homeland.

Later Monday evening, Mariela Escobar, 52, a part-time cleaner, pored over a vat of fuming tamales - “hundreds of them,” she said - to hand out free for dinner.

“People helped us greatly,” said her neighbor, Angela Moreno Galves, 81. “So now, of course, we want to help too.”

Setting out from Honduras on Oct. 13, the caravan quickly swelled to number several thousand people. The latest estimates put its size at 3,500 to more than double that - matching or exceeding Niltepec’s population of 3,800.

The warmth of the welcome in Niltepec stood in deliberate, stark contrast to Trump’s hostility, said Jorge Luis Fuentes, a senior town official.

“It’s a form of struggle,” he said. “It’s a way to demonstrate that rights are universal.”