A building explosion in northern Japan's Sapporo that injured 42 people on the weekend occurred after employees of a real estate office emptied about 120 deodorizer spray cans, a company operating the office said Tuesday.

The employees tried to empty 120 out of 160 new spray cans for disposal without knowing the gas was flammable, said Taiki Sato, the chief of the Hokkaido unit of Apamanshop Leasing Co. The explosion occurred after employees turned on a water heater.

The office had kept unused cans because there were some cases in which it did not carry out the odor removal service for properties despite customers having paid for it, he said.

According to the manufacturer of the deodorizer, the product continuously releases its contents for about four minutes.

Police believe the gas quickly filled up inside the room where doors and windows were closed and eventually triggered the blast, which damaged buildings as far as 100 meters.

"We want to offer our sincere apologies for causing great trouble to many people," Sato said at a press conference in Sapporo.

He said the can disposal work took place as the real estate office was to be renovated on Tuesday.

But Sato said he "can't think of emptying 120 spray cans all at once" and added that each office generally holds about 50 to 100 cans in stock.

No one was killed in the blast partly because it took about 10 minutes for the nearby buildings to be engulfed in flames, according to police.

People who were initially trapped on the second floor of a Japanese-style pub next to the real estate office said they were only able to escape when the entire second floor collapsed after many of them went to the window-side of the building.

A 41-year-old woman living near the real estate office said she saw two young men holding spray cans in both of their hands and emptying them toward the office building at about 12:15 p.m. Sunday. She added she saw a cardboard box at their feet with six more spray cans inside.

"I saw white smoke and smelled something like mint. My eyes were hurting. I reported it to police as I thought it was related to the incident," she said.

In the explosion that occurred around 8:30 p.m. Sunday in Toyohira Ward in the capital of Hokkaido, 19 males and 23 females, aged from 1 to their 60s, were injured.

Wooden buildings housing the real estate office, the "izakaya" pub and a clinic collapsed, forcing diners and shop staffers to flee in panic.

As fire blocked the stairs of the pub, one man said he jumped from the window, while others said they were rescued after falling to the first floor.

A 49-year-old man recalled his escape, saying, "If the (second-level) floor had not collapsed, all of us would have been burned to death."

Two male employees of the real estate office are believed to have been near the blast center. One of them was seriously hurt, while the other sustained minor injuries.

Makoto Tsujimoto, a professor emeritus of building fire prevention studies at Tokyo University of Science, said if gas concentrated in a closed space catches fire, air is inflated suddenly, causing an explosion nearby coupled with potential fires.

"People at the center of the blast could sustain burns but may only suffer relatively minor injuries," he said.

In the past, consumers in Japan were advised to puncture spray cans before discarding them but an increasing number of municipal governments have banned doing so in recent years due to the risks of explosions and inner liquid splashing into the eyes.

Following accidents involving spray cans, the Environment Ministry advised against puncturing cans in a notice to municipal governments across Japan in 2015. But some local governments continue to puncture them as their garbage trucks would need to be replaced if they are to follow the guidance.

For safe disposal, an industry body is calling on consumers to use up sprays, check if the cans are completely empty by shaking them and remove gas by using a special cap outdoors where there is nothing to cause a fire.

Manufacturers have developed the special cap to help remove gas safely and most aerosol spray products are now equipped with it.