FRESNO, Calif. — Relatives of two exchange students from Thailand who were killed in California are planning funeral ceremonies after their bodies were pulled from a mangled rental car lodged on boulders in the middle of a river, a Thai diplomat said Tuesday.

A recovery team reclaimed the two bodies on Friday from the car in the Kings River near Fresno, more than a month after it careened down a 500-foot (152-meter) cliff on July 26.

Relatives of the two victims endured weeks of waiting before the team felt it was safe to enter the dangerous rapids deep in a gorge.

“It was agonizing for them,” said Tanee Sangrat, consul general at Thailand’s consulate in Los Angeles. The relatives have come to “accept the fates of their loved ones,” he said.

The Fresno County Sheriff’s Office used a helicopter to lower the recovery team into the river. They used a hand wench to pull the car to the riverbank and free the bodies.

Crime scene analysts used fingerprints to confirm that the victims were Pakapol Bhakapon Chairatnathrongporn, 28, and his friend Thiwadee Saengsuriyarit, 24.

They were students at the University of South Florida and were visiting Kings Canyon National Park in the Sierra Nevada when their car crashed through a guardrail and plunged into the river.

The story has gripped Thailand, Sangrat said.

Authorities have not yet released the cause of death. Fresno officials turned over the remains to a funeral home and relatives will have them cremated before a ceremony expected later this week at a Buddhist temple in North Hollywood, Thai and Fresno County officials said.

Relatives of Saengsuriyarit will take her ashes back to Thailand, while Chairatnathrongporn’s cremated remains will be scattered in California because “he loved the U.S.”

Investigators as a result of the recovery effort also found another car submerged nearby that authorities believe was driven by a missing couple from China.

Officials think the second car crashed into the same stretch of river around Aug. 6.

Authorities have said it could take weeks for the river’s level to drop enough for them to retrieve that car and determine if anyone is inside.