Riverside County residents were allowed to return to their homes and a section of the 215 Freeway reopened Saturday morning after being closed for more than a day due to a chemical leak from a train tanker, authorities announced.

The freeway was closed and homes were evacuated late Thursday evening after a railroad tanker began leaking styrene, which had become potentially combustible due to heat.

The evacuation orders impacted more than 100 homes in Perris.

Riverside County Fire Battalion Chief Mark Scoville told KTLA during Saturday morning’s live newscast that experts were able to stabilize the tanker overnight amid cooler weather conditions.

“The idea was to wait until the evening when the solar radiant heat didn’t come down on it,” Scoville said. “We were able to get people in to do an inspection of the tank, which then gave us the okay to go ahead and start cooling.”

BNSF Railway experts were able to reverse the tanker’s heating coils and use them as cooling coils, Scoville said.

“We threw a hail mary and it worked out for us.”

Scoville said a “repopulation plan” was underway to have all residents returned to their homes early Saturday.

By 9:15 a.m., Riverside County Fire officials announced that the remaining evacuation order had been lifted and residents could return home. The evacuation center at Pinacate Middle School would also be closing Saturday, officials said.