SYDNEY, Australia -- Four people were killed Tuesday after a river rapids ride malfunctioned at a popular theme park on Australia's east coast, officials said.

Two men and two women died while on the ride at Dreamworld, a park on Queensland state's Gold Coast, Queensland police officer Tod Reid told reporters.

The Thunder River Rapids ride whisks people in circular rafts along a fast-moving, man-made river. A malfunction caused two people to be ejected from their raft, while two others were caught inside the ride, said Gavin Fuller, an officer with the Queensland Ambulance Service. He did not know whether the two victims who were caught in the ride were trapped under water, or caught up in the machinery.

Park staffers administered first aid to the victims, but their injuries proved fatal, Fuller told reporters.

The victims were in their 30s and early 40s, he said.

Reid said he was not aware of any previous problems with the ride. Police were interviewing witnesses and reviewing closed-circuit television footage of the incident while crews worked to remove the bodies from the scene on Tuesday night, he said.

"It is a complex retrieval involving heavy equipment and that will take several hours," Reid said.

Dreamworld CEO Craig Davidson said the park was working with police to try and determine what went wrong.

"We are deeply shocked and saddened by this, and our hearts and our thoughts go out to the families involved and to their loved ones," Davidson told reporters.

The park was closed following the accident and was expected to remain closed on Wednesday.

A witness, Lia Capes, told the Australian Broadcasting Corp. that she was just about to go on the ride when she saw people running out, crying.

"I was speaking to one of the guys and he said it was the raft or the boat thing in front of him, the whole thing flipped and everyone was screaming," Capes said.

Thunder River is considered one of Dreamworld's tamer, family-friendly rides, and is open to children as young as 2. The park, which has been open since 1981, also features several roller coasters and the free-fall ride "The Giant Drop," where passengers plunge from a height of nearly 120 metres (400 feet). In April, the park's Rocky Hollow Log Ride was temporarily shut down after a man fell from the ride.

Australian Prime Minister Malcolm Turnbull said there would be a thorough investigation into the cause of Tuesday's accident.

"Theme parks are a place for family fun and happiness, not tragedy," he told reporters.