Madrid: Spain in 2022 experienced the hottest year since records began, the country's national weather service said Monday, as global warming stokes temperatures around the world.

Nations across the globe grappled with extreme weather including scorching temperatures and drought across Europe which fuelled wildfires, damaged crops and led to water use restrictions.

Spain recorded an average temperature for the year of nearly 15.5 degrees Celsius (59.9 Fahrenheit), the highest since records began in 1916, national weather office Aemet said in a tweet.

It was the first time that the average yearly temperature surpassed 15 degrees celsius, the office added.

Spain saw temperatures surge repeatedly in successive heat waves from May and into October, with the mercury soaring above 40 degrees Celsius across large swathes of the country.

Except for March and April, the remaining months of 2022 were "warmer than normal, especially May, July and October which were extremely warm," the weather office said in a preliminary report last month.

Spain also recorded one of its driest years in 2022, with only 2005 and 2017 having received less precipitation, it added.

The country's reservoirs were at 43 percent capacity at the end of December, below a 10-year average of 53 percent, according to the environment ministry.

Barcelona and large swathes of Spain's northeastern region of Catalonia have imposed water restrictions due to the lack of rain.

The measures include banning the use of drinking water to wash the exterior of houses or cars or to fill swimming pools, and reducing the amount of water used for irrigation.

The scorching temperatures this summer caused the deaths of 4,744 people in Spain, according to an estimate from a public health institute based on the number of excess deaths recorded during the period.

Heat can kill by inducing heatstroke, which damages the brain, kidneys and other organs, but it can also trigger other conditions such as a heart attack or breathing problems.

The exceptionally dry and hot year favoured explosive wildfires that ravaged over 300,000 hectares (740,000 acres) of land in Spain, according to the European Union's EFFIS satellite monitoring service, the biggest amount in over two decades.