Section 7(k) of the Fair Labor Standards Act is the public-safety exemption. It lets a fire or EMS employer measure overtime over a work period of 7 to 28 days instead of the standard 40-hour week that covers most jobs. The employer declares a work-period length, applies the cap for that length, and pays overtime only on the hours worked above the cap. The rules live in 29 CFR 553.230.
This is not a loophole, it is a recognition that fire and EMS schedules are built on long tours, not eight-hour office days. A firefighter on a 24-hour shift is not working a 40-hour week in any normal sense, so Congress gave fire and EMS employers a longer measuring stick. The tradeoff is that the threshold is higher than 40 hours a week, which is exactly why so many overtime estimates for firefighters come out wrong: they use the wrong measuring stick.