Sydney has sweltered through its third hottest October day on record with a gusty cool change expected to keep fire crews on high alert well into the night.

The city's temperature reached 37.3 degrees just after 3pm and hovered near that level for more than an hour before dropping back below 36 degrees shortly after.

Forecasters had tipped the mercury to rise to as high as 39 degrees which would have broken a 2004 record. The city has only had four days of 37 degrees or higher in October in records dating back to 1859.

Elsewhere, many regions saw record or near-record heat. Wilcannia, in far western NSW, clocked 42 degrees, a state record for the first 10 days of October.