Wildfires are raging in arid Arizona. The rain just won’t stop in Charleston.

But the two places share a painful bond: the devastating loss of brave firefighters.

Nineteen firefighters died in Arizona on Sunday as the wildfire they were battling trapped them near Yarnell, a town about 80 miles northwest of Phoenix.

The elite, highly trained squad was known as the Granite Mountain Hotshots.

In Charleston, it was just over six years ago that nine members of the Charleston Fire Department were killed while battling a fire at the Sofa Super Store on Highway 17 South. The community continues to feel the pain of their loss.

Officials still aren’t sure just what went wrong in Arizona.

They believe the men had put up fire shelters, a tent-like safety device designed to deflect heat and trap breathable air, in a last-ditch effort to survive. But a full investigation will take time.

Charleston knows the agony of waiting for questions to be answered — and the agony of getting the answers.

The Charleston Nine’s deaths were the impetus for an in-depth assessment of the department, its equipment, training and regulations. It eventually led to safety and efficiency improvements and personnel changes.

Perhaps there are tough lessons to learn in Arizona also. Or perhaps, as one official said, it was simply a “perfect storm” that killed those firefighters, who each had undergone rigorous training.

They had to pass a test carrying a work pack and running 1.5 miles in 10 minutes 35 seconds, and complete 40 sit-ups in 60 seconds, 25 push-ups in 60 seconds and seven pull-ups.

They were skilled at wildfires — at knowing how to sense what a fire would do and how to battle it.

The Charleston Nine were skilled at fighting fires in buildings to keep them from spreading and to keep people safe.

But the most defining similarity among these and all firefighters is courage. They race into burning buildings. They put themselves in the way of raging brush fires. They see a World Trade Center Tower crippled by a terrorist-driven airplane and they don’t hesitate. They go in, 343 of them sacrificing their own lives while trying to help.

Experts have said the current fire season could be one of the worst on record.

But it goes without saying that firefighters in Arizona won’t be shrinking back after their colleagues’ deaths.

They will be even more determined to stop the raging fires to honor the Granite Mountain Hotshots, and then to mourn their friends’ deaths.

It’s what firefighters do.

And we in Charleston, like people in Arizona, New York City and the rest of the country, are profoundly grateful that it is.