NEW DELHI — A smoke-filled inferno killed at least 18 people in a commercial building in western India on Friday, and officials warned that the death toll from the blaze in the state of Gujarat could go higher.

As horrified residents looked on, students from a tutoring center on the top floor of the four-story building in the city of Surat and, and patrons from a gym on the third floor, emerged out of the billowing smoke, then jumped from windows in an effort to escape to safety.

It took firefighters “nearly 45 minutes to control the fire,” said J.J. Patel, an officer in the city’s fire department.

The number of casualties could still rise as firefighters cleared the area and many of the burned were taken to the hospital.