Fairfax County firefighters respond to a fire in January 2014. (John McDonnell/The Washington Post)

Fairfax County has agreed to pay $7.85 million to settle a lawsuit over fire department overtime pay.

The suit was brought in 2014 by 176 Fairfax fire captains who argued that they were first responders who should receive overtime pay rather than supervisors who did not. The county fought back, maintaining that the captains — fifth-highest in the fire department chain of command — are executives and administrators who should not get overtime.

In a ruling earlier this year, after a long legal battle, the Fourth Circuit Court of Appeals sided with the captains.

“Whatever the precise importance of the Captains’ non-firefighting duties — the evaluations, the disciplinary reports, the annual conforming changes to station policies — it is clear that fighting fires is the more important part of the job,” a unanimous three-judge panel wrote. “Unlike their superiors, Captains are part of the core group of firefighters who are required to respond to a typical call; an engine cannot leave the station without its Captain on board.”

Under the Fair Labor Standards Act, fire department employees whose job is primarily emergency response must be paid overtime.

Of the $7.85 million, $1.4 million will go to the fire captains’ lawyers for their fees. The rest will go to the fire captains, as back pay and half as damages. From Jan. 3, 2011 to Sept. 16, 2016, according to the settlement, the fire captains were entitled to an extra half-time of pay for every hour worked above 212 hours in a 28 day work-cycle.

On Sept. 16, the county began paying overtime to fire captains.

The settlement was approved by a judge in the Eastern District of Virginia on Friday. Before it takes effect it must be approved by the Fairfax County Board of Supervisors in a meeting next week.

“I think it’s absolutely a fair deal and it was well and hard fought by both sides,” the captains’ attorney Molly Ann Elkin said. “I’m really proud.”