SANTIAGO / MADRID (Reuters) - Spain will likely 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, a Spanish government source said.

Slideshow ( 23 images )

The summit is aimed at fleshing out details of the implementation of the landmark Paris Agreement climate pact, amid calls for urgent action from environmental groups and climate protesters.

The Spanish government said in a statement earlier on Thursday that Prime Minister Pedro Sanchez was ready to do what was needed to host the summit in Madrid.

A formal decision on hosting the summit in Madrid will be taken on Monday, the source said on Thursday.

“It is nearly done, we have every chance of getting it,” the source said.

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 so-called Conference of the Parties (COP) is the formal meeting of parties to the United Nations Framework Convention on Climate Change (UNFCCC).

A spokesman earlier on Thursday said the UNFCCC was waiting to receive an official letter from Spain offering to host the talks and would then organize a meeting to assess the offer.

Chile’s withdrawal is the first time that a nation has pulled out of hosting the conference with just a month to go.

Violent riots in recent days have left large parts of capital Santiago shut down, with its vital metro transport system suffering nearly $400 million in damage.