(CNN)A captain in the Stockton, California, fire department has died after a man shot him at the scene of a fire, officials announced at a news conference Monday.
Capt. Max Fortuna and other firefighters responded to a dumpster fire early Monday, Stockton Fire Department Chief Rick Edwards said.
The Engine 2 crew was fighting the fire when they heard gunshots.
"Firefighters quickly transitioned to provide EMS care for their fallen brother and transported him to the local hospital," Edwards said, adding that he was devastated over Fortuna's death.
"This is my worst nightmare as the fire chief," Edwards said. "This is a very, very sad day as a fire department."
Police officers responded and detained a 67-year-old man, Stockton interim Police Chief Jim Chraska said.
Chraska didn't reveal the man's identity and said the investigation is ongoing. A gun was recovered at the scene, he said.
Fortuna, 47, spent more than 21 years with the department and is survived by his wife and two grown children, Edwards said.
"Max was a firefighter who showed up every day and never complained about being on the job. Don't really know too many other firefighters who enjoyed the job as much as him," remembered Stockton Firefighters 456 Union President Mario Gardea. "It's a tragic day. It hasn't set In. Max was always considered a legacy firefighter and he's going to be missed."
Stockton Mayor Kevin Lincoln said Fortuna was a hero.
"This is a sobering reminder of the many sacrifices our firefighters make day in and day out in service to our community," he said.
Stockton is about 50 miles south of Sacramento, in California's Central Valley. It has a population of about 320,000, according to the US Census Bureau.