Two mental health patients drowned inside of a sheriff's office van that was overtaken by floodwaters on a South Carolina highway, state authorities said Wednesday

The deputies who were transporting the two women survived, but have been placed on administrative leave while their actions are being investigated.

Horry County Sheriff Phillip Thompson said the deputies were caught in a flood Tuesday night about a half-mile from the Little Pee Dee River on their way to a mental health facility.

While the two deputies tried to free the women, who were confined to one section of the van, they were unable to yank the back doors open.

"I'm not sure if it's the way the van was positioned or pressure from the water," Thompson said at a news conference Wednesday.

The sheriff said that the deputies tried in vain to help the patients "for a long period of time," but finally took refuge on top of their vehicle as the waters climbed higher.

Rescue teams from Marion County were dispatched to the scene and saved the deputies, who were later identified as Stephen Flood, a 10-year veteran of the sheriff's office and Joshua Bishop, who'd been on the force for 6 years.

A Marion County coroner confirmed the two deaths and identified the patients as Wendy Newton, 45, and Nicolette Green, 43.

Divers were unable to recover the van late Tuesday because of safety concerns, officials said. The bodies of both women were recovered by divers on Wednesday, a public information officer for the sheriff’s office said in a statement.

Horry County officials earlier identified the victims as "detainees," but the Marion County coroner clarified they were mental health patients. They were being transported from their hospitals near the coast to a behavioral center further inland in Florence.

It's unclear why the deputies made the treacherous trek through an area with hazardous flooding and what exactly hindered the patients from getting freed from the vehicle.

The sheriff’s office spokesperson said in Wednesday’s statement that "officers were transporting Green and Newton following involuntary commitments by a physician."

Thompson said he doesn't believe the women were in restraints while they were being transported.

He added that a probate court order required the women be transported Tuesday — just as the Little Pee Dee River rose to a major flood status — but he couldn't say whether the deputies had the discretion to put off the request because of inherent dangers on the road.

He added that there were barriers on the road, and the van may have gone around them.

"We need to ascertain why they did," Thompson said. The two deputies have been placed on administrative leave amid the investigation.

The women's deaths bring the total to at least 35 killed since Florence made landfall Friday as a Category 1 storm.

Most of the deaths have occurred in North Carolina, where entire communities have been virtually cut off by floodwaters and are grappling with rivers cresting at record levels.

The Cape Fear River at Fayetteville rose to more than 61 feet early Wednesday, surpassing the level it reached during Hurricane Matthew in 2016. Residents along the banks had been evacuated as a precaution.

"This is unbelievable compared to Matthew," resident Kurt Reed told NBC affiliate WRAL. "It's been a creeping death."

Elsewhere, the Little River along the Harnett-Cumberland County line was swallowing homes. In the Manchester area, the river was expected to reach nearly 40 feet by Wednesday morning — more than double the flood stage.

President Donald Trump landed in North Carolina on Wednesday morning at Marine Corps Air Station Cherry Point in Havelock as part of a tour of the storm-ravaged region.

Roy Cooper, the state's governor, said North Carolina "took a gut-punch" and people still remain in danger with the rising rivers.

Trump pledged the federal government would expeditiously provide all the federal funding needed for Hurricane Florence recovery.

"There will be nothing left undone," he said. "You'll have everything you need."

CORRECTION (Oct. 2, 2018, 3:18 p.m. ET): A previous version of this article misstated the first name of one of the victims. She is Wendy Newton, not Windy, the Marion County coroner said.