The three districts will be under a yellow warning until 15:00 today.
The Portuguese Institute of the Sea and Atmosphere (IPMA) has also issued a yellow warning for the south coast of Madeira due to the hot weather from 09:00 today until 18:00 on Friday.
The IPMA forecasts periods of rain for the mainland today, with the heaviest rainfall in Minho, Douro Litoral and the highlands of the central region, and with mist or fog, strong winds in the highlands, a slight rise in the minimum temperature and a fall in the maximum.
Temperatures will range between 14 degrees Celsius (in Guarda) and 20 (in Faro) and maximums between 19 (in Bragança, Porto and Viana do Castelo) and 28 (in Faro, Beja and Évora).
For the Madeira archipelago, periods of very cloudy skies are forecast, with light to moderate northeasterly winds, sometimes blowing strongly in the highlands and the eastern and western extremes of Madeira Island from the afternoon onwards.
Temperatures will range between 22 and 28 in Funchal and between 27 and 22 in Porto Santo.