Two men from the Delek Refining Ltd. refinery were being treated for burns at a hospital, and two others were in good condition, officials said.
All other workers at the refinery in Tyler, about 90 miles east of Dallas, were accounted for, said Paula Lovell, spokeswoman for Delek, based in Nashville, Tenn.
A loud explosion was reported Thursday afternoon, and several fire crews responded, said Tyler Fire Capt. Jeff Akin. The fire was mostly under control within about an hour.
The refinery, which employs about 270 people, has a capacity of 60,000 barrels per day and is the 94th-largest oil refinery in the U.S., according to the U.S. Department of Energy.
It's in a mostly industrial area of town, but some people do live nearby. Nearby residents were advised to stay indoors, and other residents were asked to stay away.