An 88-year-old man was taken into custody Monday after he opened fire while being tended to by Berkeley firefighters, grazing one of them, authorities said.

The man was being treated for an unknown medical problem at his home on the 1200 block of Dwight Way about 1:45 a.m. As firefighters tended to him, he began resisting their efforts, and firefighters called police to the home, authorities said.

As officers were on their way, the man began firing from a handgun, police said.

A firefighter was grazed by a bullet but escaped major injury because it hit - and destroyed - a pager-like communication device he wore on his belt, authorities said.

The fire crew ran from the home, and officers took the man into custody after a brief standoff. His name was not released.

He was taken by paramedics to a hospital for a psychiatric evaluation. Police would not say if he could face arrest or charges in the case. Several guns from the home were removed for safety reasons, police said.

The injured firefighter was treated at the scene and did not require hospitalization, said Officer Jennifer Coats, a police spokeswoman.