Mainland Spain recorded its hottest ever temperature for April, hitting 38.8 degrees Celsius (101.8 Fahrenheit) in Cordoba, preliminary data from national weather office showed Friday.

The temperature recorded at the airport in the southern Spanish city on Thursday "would be...a record temperature in mainland Spain for the month of April", state weather agency AEMET tweeted.

This "provisional data" must still be confirmed, a process that can take several days, a spokesperson for the agency told AFP.

The previous record high temperature in mainland Spain was set in 2011 in the eastern city of Elche when the mercury hit 38.6 degrees Celsius.

The highest temperature for all of Spain in the month of April, however, was recorded in 2013 in the Canary Islands off the northwest coast of Africa when the mercury hit 40.2 degrees Celsius.

Spain and neighbouring Portugal have been gripped by an unusually early heatwave, driven by a mass of very hot and dry air coming from Africa.

The mercury hit 32 degrees just after noon (1000 GMT) on Friday in Cordoba and the central city of Ciudad Real.

Temperatures are expected to ease over the weekend.

The scorching temperatures have prompted warnings about the high risk of wildfires and worsened drought conditions that have already led some farmers not to sow seeds this year.

Last year, Spain experienced its hottest year since records began, with UN figures suggesting nearly 75 percent of its land is susceptible to desertification due to climate change.

Water reservoirs are at half their capacity nationally and the COAG farmers' union says 60 percent of farmland is "suffocating" from lack of rainfall.