The thermometer at the construction gate on the northern edge of Riyadh read 39 degrees Celsius, or 102 Fahrenheit, at 11:45 a.m. on Monday, and the foreman blew a whistle. Four hundred workers filed into air-conditioned sheds, where they will stay until 3 p.m. On the same date five years ago, they would have kept working.

Saudi Arabia’s labor ministry announced on Sunday that the kingdom’s annual ban on outdoor work between noon and 3 p.m., which has run from mid-June to mid-September since 2010, would be extended through Oct. 31 this year and, from 2027, would be triggered by temperature rather than by date: any day on which the forecast high exceeds 38 degrees Celsius. The ministry said inspectors had recorded 24 days in September this year above that threshold in Riyadh, compared with an average of 9 in the 2010s.

The decision reflects a shift in the way Gulf states are approaching heat, which has become the region’s most pervasive occupational hazard. Riyadh’s summer high averaged 44.2 degrees Celsius this year, and the city recorded its latest-ever 45-degree day on Sept. 28. The kingdom employs about 10 million foreign workers, the majority from South Asia and Africa, and about 2.5 million of them work in construction, where the government’s giga-projects, including the new financial district and the Expo 2030 site, have kept demand high.

“A date on a calendar made sense when summer ended in September. It no longer does,” said Dr. Saud al-Dossary, the ministry’s director of occupational safety, who briefed reporters on the change. “The body does not know what month it is. It knows the temperature.”

Labor advocates have pushed for a heat-index trigger, which accounts for humidity, rather than air temperature alone; the ministry said it would study the proposal. The Saudi Red Crescent reported 1,870 heat-related emergency calls in the kingdom in July and August, about a third of them involving outdoor workers, and the ministry levied fines on 4,200 employers for violations of the midday ban in the same period, up 60 percent from the previous year.

Contractors say compliance has become easier as they have adapted, but that the cost is real. A large construction firm in Riyadh estimated that the midday break, combined with the shift of concrete pours to overnight hours, added about 6 percent to labor costs on summer projects. Several have begun installing cooled vests and wearable sensors that alert supervisors when a worker’s core temperature rises. “We are scheduling the year around the heat now, not the other way around,” said Faisal al-Shammari, operations director at a contractor working on the financial district. “October used to be the start of the productive season. This year it is the end of summer.”

Bangladesh and Nepal, which together supply about a fifth of Saudi Arabia’s construction workforce, have pressed the kingdom through their embassies for longer breaks and for a cap on continuous outdoor hours; the ministry said both proposals were under review. Muhammad Rafiq, 31, a steel fixer from Sylhet who has worked in Riyadh for four years, said the shed was a relief but that the problem was the morning. “By 11 it is already 38. By then we have worked five hours in it,” he said. “They should start us at 4 a.m. Then we would not need the shed.”

The foreman, asked whether a 4 a.m. start was possible, said the client would have to agree. The client, he said, was the government.