BANGOR, Maine — Bangor firefighters extinguished a kitchen fire that got out of hand Thursday afternoon at a Hammond Street building that houses three apartments and a business.

The fire started on the stove of a second-floor apartment at the rear of the building at 273 Hammond St. Fire crews were called to the scene shortly before 4 p.m. and quickly shut off gas to the building, Assistant Fire Chief Anthony Riitano said at the scene.

“The kitchen has quite a bit of damage,” Riitano said.

Bangor police blocked off Hammond Street from Union Street to Ohio Street for about 30 minutes.

There are three apartments in the building and a business — the Hair’s Den — on the first floor. Residents will have to relocate for a time because of the extensive smoke damage, and the American Red Cross was called in to help them, according to Riitano. The building is owned by David Lawler.

The fire brought three fire engines and a pair of ambulances to the busy intersection.

There were a dozen Bangor firefighters in Boston on Wednesday and Thursday attending the funerals of two Boston firefighters killed in a Back Bay blaze on March 26.

Riitano said Bangor Fire Department still had the required amount of personnel on duty and was able to respond appropriately to the fire.

No firefighters or residents were injured in the blaze, Riitano said.