It pays to be a Los Angeles firefighter — who can earn up to $300,000 a year in overtime — according to study released Tuesday of public employee compensation across California.

The top 20 overtime earners by public workers across the state were firefighters for the city of Los Angeles — where overtime payouts rose 18 percent from last year, according to a Nevada-based survey of 246,000 public employees in California. Each top earner had pocketed outsized paychecks for at least three years.

The extra hours allowed one firefighter with the Los Angeles Fire Department last year to kick up his total pay to $404,308 — more than four times his base salary, according to the study by Transparent California, a project of the Las Vegas-based Nevada Policy Research Institute.

Two other L.A. firefighters also earned around $300,000 in overtime, according to the survey.

The hefty amount of overtime worked by just a few employees can be dangerous, especially for firefighters, said study author Robert Fellner of Transparent California.

• RELATED STORY: Perks and benefits for workers in L.A. County cities can almost double overall compensation, study finds

These overtime payments indicate an average workweek of more than 100 hours, said Fellner, director of research for the Nevada-based nonprofit.

“This is a recipe for disaster given the life-or-death situations firefighters routinely encounter,” Fellner said of the long hours it would take to incur so much overtime.

Los Angeles officials, however, say the report fails to explain the complex reasons for its firefighter overtime: a five-year hiring freeze coupled with the retirements of seasoned firefighters have led to long-standing staffing shortages amid a rise in emergency response service calls.

“At the end of the day, when you’ve got one of the most populated cities in the nation and a chronic shortage of firefighters, (they get) lots of overtime,” said Councilman Mitchell Englander, who chairs the council’s public safety committee. “They’re also the hardest working fire department in the nation, doing more with less. They don’t want this kind of overtime; they’re burnt out. They want more hires.”

The No. 1 public earner in the city was Los Angeles fire Capt. James P. Vlach, whose total compensation — including health but minus retirement benefits — came to $462,523. His overtime pay clocked in at $311,316, or 158 percent more than his $120,829 salary, according to the survey.

The No. 2 earner was firefighter Donn Thompson, whose total earnings came to $404,308. His overtime came to $286,733, or 229 percent more than his $87,158 salary.

Frank Lima, president of United Firefighters of Los Angeles City, the firefighters’ union, was out of the office Tuesday and unavailable.

Peter Sanders, spokesman for fire Chief Ralph M. Terrazas, said the department emerged last year from a five-year hiring freeze, and retirements and attrition have led to an increase in overtime. He added that the city is busy hiring new firefighters and expects to catch up with its losses during the fiscal year beginning July 1.

“Once our staffing levels have balanced out, we expect the amount of available overtime to decrease,” Sanders said, “though there will always be some overtime opportunities available due to illness, injuries and vacation time used by our firefighters.”