A woman was seriously injured early Wednesday when she was ejected from her vehicle after it crashed into the woods off the William Floyd Parkway and burst in flames, Suffolk County police said.

The woman was burned by the flames but dragged to safety by a police officer who was first at the accident scene, a police spokeswoman said.

advertisement | advertise on newsday

She was taken to Stony Brook University Hospital and was listed in serious condition, the spokeswoman said.

In addition to the burns, the woman had other injuries deemed serious but not life-threatening, the spokeswoman said.

William Floyd Parkway was closed southbound to the Long Island Expressway until shortly after 6 a.m. for an investigation, police said.

The accident happened at about 2:38 a.m. when the woman was driving south near Longwood Road in Yaphank and lost control, police said.