SAN JOSE -- A firefighter suffered a concussion and a neck injury when a ceiling fell on him while battling a three-alarm Thanksgiving night fire that displaced 18 people in West San Jose, the San Jose Fire Department said.

Fire Capt. Rob Brown said the firefighter, a 16-year veteran of the San Jose squad, is recovering and should be back on the job after some time off.

"He's doing all right, in good spirits," Brown said.

Firefighters were called at 8:23 p.m. to a townhouse complex in the 900 block of Willowleaf Drive for reports of a roof fire. Brown said the four people who live in the two-story unit were alerted to the fire by neighbors who saw flames around the chimney. The residents, who escaped safely, had been using their fireplace at the time.

A third alarm was quickly called as the fire spread rapidly, Brown said. A group of firefighters entered the townhouse and were climbing a staircase when a waterlogged piece of sheetrock in the ceiling fell on top of them.

One firefighter took the brunt of the collapse and suffered a concussion and fractured vertebra in his neck, Brown said. Other firefighters suffered minor injuries but were able to dig out their injured comrade and help him out of the building.

"He gave us a good scare. We're glad that he's alive," Brown said.

The fire was brought under control within three hours. Four of the six townhouses in the complex were heavily damaged, and 18 people were displaced, though not all of the residents were home when the fire broke out.

While the fire is under investigation, Brown said it appears to have been accidental.

Contact Robert Salonga at 408-920-5002. Follow him at Twitter.com/robertsalonga.