ALLEGANY — Heavy flames and smoke engulfed a Subway restaurant Saturday, bringing out firefighters from numerous local agencies, as well as crowds of onlookers.

The blaze, reported shortly before 5 p.m., left the West State Street building heavily damaged and with a collapsed roof, but no one was injured.

“The front of the building was fully engulfed by the time I arrived,” said Jeremy Crowley, first assistant chief of the Allegany Volunteer Fire Department.

The brunt of the flames appeared to be toward the front of the restaurant, while the back of the building — at least from the outside — appeared less damaged. However, Crowley said he could not yet say where the fire began or what was a possible cause.

The blaze is under investigation by the Cattaraugus County Fire Investigation Team.

There were two employees and an unspecified amount of customers inside the restaurant when the fire broke out, but all were able to evacuate safely, according to Crowley.

Emergency services received between 15 to 20 calls reporting the fire starting at around 4:51 p.m., and first responders arrived on scene about five minutes later, according to Michael Brady, an EMT with Allegany Rescue and EMS.

The fire was extinguished by 5:20 p.m., according to Crowley.

Photos and videos of the fire were widely shared on social media, showing large flames devastating the front of the building and the Subway sign on the front lawn, as well as thick, black smoke.

Dawson Dwaileebe, who has worked at the Subway location for about six months, said he noticed the smoke in the air as he was arriving for his 5 p.m. shift.

“I just kind of figured maybe it was Burger King or something,” he said. “The building wasn’t completely engulfed when I got here, it just progressively burned as I got here.”

The damage appeared to have left the building at 3015 Route 417 a total loss, but Crowley said he could not confirm that without the report of the Cattaraugus County Fire Investigation Team.

The building is owned by Olean-based JPCM Food Services Inc., which purchased the building for $99,000 in 2012, according to Cattaraugus County property records.

In addition to damaging the restaurant, the fire also appeared to cause smoke damage to the side of the home next door, 3019 Route 417.

Allegany firefighters were assisted by the town of Olean, Hinsdale, Westons Mills and Portville volunteer fire departments. The Limestone Volunteer Fire Department was on standby. New York State Police also responded to help direct traffic.