Four people died and two others were critically hurt after a fire broke out inside an e-bike shop housed on the ground floor of a Lower East Side apartment building Tuesday, authorities said.

Officials said the three-alarm fire began just after midnight on the first floor of a six-story building that houses apartments and an e-bike shop.

The shop, HQ E-Bike Repair, is located at 80 Madison St., at the intersection of Catherine Street.

Two men, one of whom was 71 years old, and two women, one of whom was 62 years old, were killed in the fire, police said. The NYPD didn’t immediately release the names of the victims.

A 65-year-old woman and 80-year-old man were taken to NewYork-Presbyterian/Weill Cornell Medical Center in critical condition, the department said.

Firefighters spent about three hours extinguishing the blaze. A large pile of charred e-bikes, roped off by yellow police tape, sat outside the building Tuesday morning.

In a tweet, the Red Cross said it was providing services to eight households, including 23 adults and two children.

At a news conference held near the site of the blaze Tuesday morning, FDNY Commissioner Laura Kavanagh said the site was "known" to the fire department, adding that they had written the owners of the e-bike shop up for several violations.

Dan Flynn, the FDNY's chief fire marshal, said the department inspected the property in August of 2022 and issued FDNY summonses. The owners of the shop were found guilty in court, Flynn said, and forced to pay a $1,600 fine.

The violations related to improper charging of lithium-ion batteries and the number of batteries stored at the location, Flynn said. The department also found violations related to the electrical wiring, he said.

Fires sparked by lithium-ion batteries — which are used to power electric bicycles — have proven to be fast-moving and difficult to extinguish.

So far this year, lithium-ion batteries have sparked 108 fires that have led to 66 injuries and 13 deaths, the FDNY said. The numbers include those killed and injured in Tuesday morning's fire.

Belal Alayah, who lives in the neighborhood and called first responders, told NY1 the fire "happened so fast."

"Within 10, 15 minutes, all this happened," Alayah said. "They should be regulated at this point. We don't wanna have another mess like this and people losing their lives."

Manhattan Borough President Mark Levine took to Twitter Tuesday morning to emphasize the need to "accelerate our efforts to protect against this threat."

Kavanagh, too, urged lawmakers and public officials to do more outreach to prevent another deadly fire.

"While there is tremendous and important regulation that we've conducted with the City Council and with the Mayor's Office, it is also very, very important we get the word out how incredibly dangerous this is," she said. "This exact scenario, where there is an e-bike store on the first floor, and residents above, and the volume of fire created by these lithium-ion batteries, is incredibly deadly.

An investigation into the cause of the fire was ongoing as of Tuesday afternoon.