A train derailed during heavy rains Monday near Thailand's coastal city of Hua Hin, killing 7 people, including a 2-year-old girl, and injuring 88 others, officials said.

The train jumped the tracks as it approached a station before dawn near the popular resort on the Gulf of Thailand during a journey from the southern city of Trang to the capital, Bangkok, said Police Lt. Col. Udom Chainoom.

Seven people were killed and 88 injured, said Yuthana Thapcharoen, head of the State Railways of Thailand. Of those injured, 22 were hospitalized. All of those killed were Thais, he said.

Yuthana had initially said as many as 10 people were killed. He later revised that figure, citing confusion at the scene.

SLIDESHOW: Thailand Train Derails

One foreigner, suffering broken ribs and other injuries, was undergoing an operation, said Chatree Charoencheewakun, director of the Emergency Medical Institute of Thailand. Four other foreigners suffered minor injuries. Their nationalities were not immediately known.

Chatree confirmed that seven people were dead.

About a half-dozen of the train's 16 cars derailed in the accident, Yuthana said, adding that the cause was unclear.

"We regret the loss of lives, but it's too early to conclude anything," he said. "We have not ruled out anything from the condition of the track, the switch system, the weather conditions and possible human error."

Udom said it was raining heavily at the time of the derailment.

A truck-mounted crane was sent to the accident site to help remove the wreckage. Udom said some of the bodies could not immediately be pulled from the twisted train cars.

"Those killed suffered from the impact, while some of them were crushed," Udom said.

It might take more than a day to clear the wreckage and restart the rail link between southern Thailand and the capital, Yuthana said.

Minor train accidents are not rare during the rainy season on Thailand's aging railway network, especially at crossings.

Monday's accident came less than 24 hours after another train, carrying cement powder, derailed north of Bangkok. There were no reported casualties in the Sunday accident.

Last Thursday, a passenger train in western Kanchanabhuri province derailed following heavy rain. Yuthana said the earth underneath the track was heavily soaked with water, which may have caused the accident.