A total of 27 Spanish provinces are on alert for high temperatures on Thursday, with six on red alert as the result of a heat wave which has seen thermometers reaching heights of 46 degrees centigrade, according to the Spanish State Meteorological Agency (AEMET). The six provinces on red alert; Cordoba, Granada, Jaen, Seville, Badajoz and Caceres, are all in the south and south-west of the country. Meanwhile the provinces of Cadiz, Huelva and Malaga (also in the south) are on orange alert for temperatures of between 40-43 degrees C, while Madrid is also on orange alert with the capital city sweltering in 41 degree heat. The central zone of Castilla and Leon is another area on orange alert with temperatures expected to reach 39 degrees, similar to those in the region of Teruel. AEMET has advised the temperatures mean and "extreme" risk for the population and warn of the need to take precautions such as not taking exercise in the hottest part of the day, while ensuring the consumption of sufficient liquids. The weather also means the country is on alert for possible wildfires, after the provinces of Huelva and Valencia have both seen devastating fires this summer. The heat wave is expected to continue for Friday and Saturday, although the risk level will fall slightly over the next two days. It is the second official heat wave of 2017, following the first period of extreme heat, which affected Spain in the middle of June. This year's hot weather follows 2016, which was the first year since 1975 to suffer four separate heat waves, one of which happened in September and saw the highest ever temperatures recorded for that month in Spain. Interestingly the current heat wave arrives less than a week after storms caused chaos in large parts of the country with record rainfall for July experienced in a period of less than 48 hours in Madrid.