Residents were ordered to evacuate near a southeast Texas refinery after a chemical explosion set off a major fire early Wednesday, injuring workers and shaking homes several miles away, officials said.

A blast just after 1 a.m. ignited the blaze, which moved rapidly throughout the plant in the community of Port Neches, about 90 miles east of Houston, Jefferson County Sheriff's Office Capt. Crystal Holmes said.

The fire was raging into Wednesday evening and another explosion was heard about 2 p.m., according to the Atascocita Fire Department.

Here’s the moment another explosion happened at the TPC plant in Port Neches. @12NewsNow pic.twitter.com/VlVtmS79JH — Makensie Hinkle (@MakensieTVNews) November 27, 2019

Neighbors within a half-mile of the plant were evacuated following the initial explosion, but after the afternoon explosion the entire populations of Port Neches and the neighboring city of Groves were ordered to evacuate, NBC affiliate 12 News reported.

Authorities increased the mandatory evacuation order for four miles around the TPC Group plant Wednesday afternoon, which includes those cities and part of Port Arthur, and said that air quality monitoring was going on around the clock.

"All the monitoring to date shows that our air quality is within the guidelines that are set by both state and federal departments and agencies," Jefferson County Judge Jeff Branick said at a Wednesday evening news conference. He said that he did not know how long the evacuation order would be in effect.

Troy Monk, TPC Group’s director of health, safety and security, said Wednesday evening that the focus of the response was to keep the fires away from vessels of other materials and to keep them cool.

The early morning explosion in Port Neches, with a population of about 13,000, blew out windows on homes several miles away.

Three workers at the site were injured, according to TPC Group, which owns the refinery and provides a range of products to chemical and petroleum-based companies, according to its website.

Branick said one of the workers was transported by air to Houston with serious burns. A second worker was treated for a broken arm, and the third had unspecified injuries.

Authorities on Wednesday afternoon said all three of the injured had been treated and released.

"We are very, very thankful that, from preliminary reports, there are no fatalities," Branick said, adding that water canons deployed at the blast site suppressed the flames significantly.

TPC said it had accounted for all of its workers on site and that they had been evacuated. On its website, the company said it employs more than 175 full-time employees and 50 contractors.

This is the view of the TPC refinery explosion from our front porch. #portneches #tpc #explosion pic.twitter.com/bicLjlzYKY — Megan Little (@BMS_Ms_Little) November 27, 2019

"The event is ongoing, but will be brought under control as quickly and safely as possible," it said in a statement early Wednesday.

Residents began making initial reports of the blast on social media at about 1:20 a.m.

Shawn Dunlap, who lives in Nederland, which is next to Port Neches, told NBC News that there were two explosions, and his friend's apartment door was blown open and windows were shattered.

"It shook our house twice," Dunlap said. "It was just like a bomb going off."

William Joshua Hranicky, 20, of Port Neches, said that he told his brother goodnight and looked out the back window and "saw just orange."

He said he told his brothers to run as the back doors blew open from the blast.

The explosion from our doorbell camera in Drawhorn addition @12NewsNow @kfdmnews pic.twitter.com/1kIUyMP7MU — Kristi Boudoin (@Kristi_Segura) November 27, 2019

Macy Malin, 22, who was staying with a friend down the street from the site said the explosion woke her up. Her friend's family, she said, were yelling and she realized that their home had been severely damaged.

"Their doors were blown open ... doorknobs themselves were shot across rooms," she said.

Malin then hurried home to Mauriceville, Texas, about 34 miles from the explosion, where she said her father was even woken up by the blast.

To drive home, she said, she had to travel in heavy traffic past the plant and was worried about what would happen if there was another explosion.

"We didn't know what had exploded and what gasses were in the air," she said. "I've never seen the traffic like that ever."

The refinery had butadiene, one of the constituent ingredients in synthetic rubbers, Branick said, as well as C4, a petrochemical raw material. Branick said the South East Texas Regional Planning Commission is monitoring the air and environmental officials arrived on site.

Joe Merola, a professor of chemistry at Virginia Tech, said based on what is known so far about the explosion it seems like a "pretty hazardous situation" and said the evacuation was "essential."

"Butadiene is a probable carcinogen in humans," he explained, adding that not enough is known about its long-term effects.

"It's legal limit is one part per million, that's a pretty small amount," he said, "it could well be occurring within a few miles of the plant."

Merola said fires at chemical plants can cause other, potentially dangerous chemicals to form at the site, and that they also can create fine soot, which can affect the lungs. The elderly, children, and people with asthma or similar conditions are most at-risk, he said, but until the exact amounts of what is in the air in the region around the plant is known, it's hard to know exactly how residents will be affected.

Omar Hamza, a 22-year-old student at Lamar University in Beaumont, Texas, was at his family’s home in Port Neches with his 19-year-old brother when the explosion happened.

"I was packing my bag in the living room and I heard this pretty loud boom and I looked out and, right after, I saw this really bright flash of light coming towards the window and then everything just kind of exploded," he said.

"I grabbed my brother and we just kind of got down and waited for all the glass and stuff to stop falling," Hamza added.

He said he called the police who advised him to stay inside the house, but that he and his brother decided to leave.

"We waited for a little bit and we kind of looked outside and everyone was running around and freaking out," he said. "So we just grabbed the important stuff we needed — I left a note on the door and we left."

Branick, who lives less than a mile away from the explosion site, said his wife thought someone was shooting at their home when she heard the blast.

"I ran out with my pistol," the judge said, before he realized it was a refinery explosion.

Texas has been the site of other major explosions, including a 2013 fertilizer plant blast in the rural town of West that killed 15 people and wiped out hundreds of homes.