Police and a good Samaritan rescued three passengers from a burning car early Saturday, Suffolk County police said.

Jon Moser, 27, of Shirley, crashed into a concrete divider Islip Terrace on Craig B. Gariepy Avenue and Sunrise Highway North Service Road around 3:36 a.m., police said. The car caught fire while three men were unconscious inside.

Two police officers witnessed the crash and turned around to assist the victims. They alerted authorities and three highway patrol officers also responded.

"We were thankfully in the right place at the right time," Suffolk County police officer Mark Lazina said.

The driver had slid down so his knees were on the gas pedal, police said. A passenger in the backseat suffered facial injuries from the crash, police said.

Islip Terrace firefighters extinguished the flames.

The driver and a passenger, John Alver, 21, of Mastic, were taken to Southside Hospital in Bay Shore, police said. A third passenger, Richard Weaver, 24, was taken to Good Samaritan Hospital Medical Center in West Islip.

All of the men were expected to survive.

Moser was charged with driving while intoxicated, authorities said. It's not clear whether he had an attorney.