President Trump offered his condolences to Mexico Tuesday after the country's capital was rocked by a deadly 7.1 magnitude earthquake.

"God bless the people of Mexico City," Trump tweeted. "We are with you and will be there for you."

God bless the people of Mexico City. We are with you and will be there for you. — Donald J. Trump (@realDonaldTrump) September 19, 2017

First lady Melania Trump also posted a tribute on Twitter.

"Thinking of those in #Mexico affected by today's #earthquake," she tweeted.

Thinking of those in #Mexico affected by today's #earthquake. — Melania Trump (@FLOTUS) September 19, 2017

The massive earthquake caused buildings to collapse and roads to crack open in Mexico City, even though the epicenter was well east of the capital in the state of Puebla.

The earthquake hit Mexico City on the anniversary of an 8.0 magnitude quake in 1985 and has left at least 42 people dead, according to the Associated Press.

Trump has had a tumultuous relationship with Mexican President Enrique Pena Nieto over his promised southern border wall, but his tweet was sent on the same day Trump focused on U.S. alliances abroad by delivering his inaugural address before the United Nations General Assembly in New York.