Hundreds of South Jordan residents have returned to their homes after police evacuated an area Friday to detonate an “explosive substance” found in a home.

The “evacuation is over” and “the operation went as well as it could have,” according to a tweet shortly after 10 p.m. Friday from South Jordan Public Safety.

City leaders asked roughly 600 residents to leave the area after police first found the explosive material Thursday night in a house located near 3400 West and 10400 South following a SWAT standoff. Experts determined that they couldn’t safely remove the substance and needed to detonate it where it was.

Police set off two detonations Friday night. The first was around 6 p.m., and the second took place before about 10:15 p.m.

Officials have not specified what the substance was.

“The investigation is far from over, as we have a lot of evidence to now process and comb through,” Lt. Matt Pennington said in an email Saturday morning. “Our federal partners are assisting us with the testing of the substance to get a definitive answer in what it was.”

Pennington said there was “significant damage to the home the explosives were in” from the detonations and “very minor damage to the home directly east.”

“To be honest, I’m not sure the mitigation of damage to (surrounding) homes could have gone any better,” he said. “The bomb team did amazing work, along with everyone else who helped make sure that could be handled as safely as possible.”

The boundaries of the evacuation zone were from Bangerter Highway to 3200 West and 10200 South to 10400 South. This spanned 168 homes and 34 businesses.

The 42-year-old man lived alone at the house where the explosive substance was found. He was being held Saturday at the Salt Lake County jail.

Police are still working to determine what his intent was with the explosive material and if anyone else was involved, according to Pennington. Officers had been investigating the man for about a week and knew he had weapons.

“The explosives were a surprise to us,” he said at a news conference Friday.

Police were called July 18 to a Culver’s restaurant on South Jordan Parkway after the 42-year-old texted threats to the business owner, according to a probable cause affidavit. The man in custody was upset at the business, which is located just south of his home, asserting “that Culver’s is harassing him and harassment is the reason mass shootings occurred.”

He asked the owner in the text messages how he would feel if the man “entered the business and mowed down customers and staff,” according to the affidavit.

The next day, police received a call that the man “had been seen carrying an AR-style rifle around the outside of his residence,” the affidavit states, and “several gunshots” were reported around the time.

The man also made a comment on Facebook that he had shot out a streetlight. Police checked the area and found that the streetlight directly west of the man’s residence was broken, according to court records. The man had two protective orders against him from April 2019 and June 2019, which prohibited him from owning or possessing firearms.

Police served a warrant around 11 p.m. at the man’s home Thursday, but he refused to surrender. As a West Valley City SWAT armored vehicle, which had eight officers inside, approached the front of the home, “it came under heavy fire and was hit with numerous bullets out of the front of the house,” according to the affidavit.

Another SWAT vehicle with five officers inside approached on the west side of the house, and “it also took several bullets from a rifle.” Shots “flew over” the heads and struck near a team of officers providing security on top of a nearby residence and business.

The man later surrendered. He admitted to shooting out the streetlight “as a way of sending a message to leave him alone” and said he shot toward police “until his gun jammed, so he surrendered,” according to the affidavit. He said he had two hunting rifles, a 9 mm handgun and a shotgun, the affidavit states.

The man was arrested on 26 possible felonies, ranging from aggravated assault targeting law enforcement with bodily injury to a violation of a protective order.