Spain has offered to host the United Nations COP25 climate change summit in Madrid, following Chile's withdrawal as host amid raging street protests in the South American nation.

The Spanish government said in a statement on Thursday that President Pedro Sanchez had indicated that it was ready to do what was needed to host the conference in Madrid. It said the UN would analyze the Madrid alternative at a meeting in Bonn, Germany, next week.

Also read: With Chile backing out, climate event COP25 might shift to Bonn

Chilean President Sebastian Pinera said Sanchez had offered to host the summit in Spain on the same days as previously scheduled, between Dec. 2 and Dec. 13.

“I hope that this generous offer from the president of Spain... represents a solution,” Pinera said. “We have shared this information with the leading authorities at the United Nations.”

The U.N. did not immediately respond to a request for comment on Spain's offer.

Violent riots have left large parts of Santiago, the initial venue for the COP25 conference, shut down, with its vital metro transport system suffering nearly $400 million in damage. The abrupt move to withdraw as the event's host caught participants off-guard and without an alternative venue.