President Trump on Tuesday pledged the U.S. would help Mexico recover from a powerful earthquake that rocked its capital region.

“God bless the people of Mexico City. We are with you and will be there for you,” the president tweeted.

Trump offered assistance just hours after a magnitude 7.1 earthquake caused widespread damage in Mexico City and its surrounding areas.

ADVERTISEMENT Videos and photos showed buildings swaying, and in some cases collapsing, as well as explosions that sent people fleeing for safety.

It was the second time in two weeks that America's southern neighbor was hit by a massive earthquake.

Trump was criticized for his slow response to the last quake; it took him six days to phone Mexican President Enrique Peña Nieto to offer condolences and assistance.

Mexico had offered help for victims of Hurricane Harvey, which devastated Texas and the U.S. Gulf Coast, but the government rescinded that offer in order to dedicate resources to recovering from the earthquake and Hurricane Katia.

Trump blamed the delay on bad cell phone service.

"Spoke to President of Mexico to give condolences on terrible earthquake. Unable to reach for 3 days b/c of his cell phone reception at site," he tweeted last Thursday.