Police and fire crews were dispatched to an apartment building in Lower Providence Township on Thursday for a large fire and reports of an explosion, officials said.

A code enforcement officer for the township reported to a home in the Eaglestream Apartments for a follow-up inspection just before 1 p.m., according to Lower Providence Township Police Chief Michael Jackson.

There, the officer was confronted by a resident, who displayed a handgun and threatened him. When police arrived at the scene, the resident ran back inside and “multiple, loud explosions” were heard from within the building, Jackson said.

A fire broke out soon after and spread to two nearby homes.

“I lost everything,” said Imane Lofti, 33, sitting under a tree with her husband, Elsayed Elsayed, near the charred remains of the home they purchased in 2019. “My money, my gold from my country [Morocco], the new computers I bought for my kids — $3,000 for Apples and tablets. This was my new house.”

She and Elsayed were working as DoorDash drivers when they got calls from their 14-year-old daughter saying something was happening. Before they could get home, the fire had started raging, and police had rescued all three of the couple’s children from the townhouse.

“I lost everything, but I thank God my kids are safe,” said Lofti.

The resident who threatened the code enforcement officer had not been identified as of Thursday evening and police had not publicly accounted for his whereabouts.

Lofti and Elsayed lived next door to that resident and said he was nice, friendly, and lived alone with few visitors.

“He always wanted to talk. He’d talk to you for half an hour,” said Elsayed.

One person sustained minor injuries as a result of the fire, and had been taken to a hospital for treatment, Jackson said.

As firefighters battled the fire, heavily armed SWAT officers and other police personnel arrived at the scene Thursday afternoon.

County officials initially issued a shelter-in-place order for surrounding homes and businesses, but it was later lifted, and Jackson said in an afternoon news conference that there was no danger to the public.

Patrick and Dina Baine live near the homes that caught fire but were not home when the trouble started, they said as they stood, hours after the blaze broke out, in a shopping center parking lot.

They were with three of their children and a few neighbors, all stranded by the lockdown order issued by police. Even after it had been lifted, Patrick Baine, 43, was leery about taking his family home.

“I hear they lifted the lockdown, but they also said they haven’t captured him yet. So, we’re like, ‘Do we really want to go home?’” the second-grade teacher asked.

His wife called the incident “completely unheard of in this area,” and said the episode had their entire neighborhood on edge.

“We have never seen anything like this,” Baine said. “We’ve had ambulances in the neighborhood when people are sick, but nothing involving a SWAT team. Nothing involving bomb units.”

Reese Rhodenbaugh, 19, a Montgomery County Community College student, lives about a football field’s distance from the epicenter of the explosion, which he walked over to survey.

”It’s not good for the neighborhood. It’s not good for the families affected,” he said.

”I saw a lady who was one of the victims, her house burned down,” he said. “She was just crying, laying on the ground. You just want to give her a hug or something.”

Near their burned house, neighbors soon surrounded Lofti and Elsayed, asking for the clothing and shoe sizes of the couple and their children.

“We’re going to help them,” one woman said.

Staff writer Justine McDaniel contributed to this article.