In this image made from video, rescue vehicles are parked outside Dreamworld on the Gold Coast, Australia, Tuesday, Oct. 25, 2016. Four people were killed while on a river rapids ride at the popular theme park on Australia's east coast. (Australian Broadcasting Corporation via AP)

SYDNEY (AP) — Four people were killed on Tuesday in an accident at a popular theme park on Australia’s east coast, officials said.

Two men and two women died while on a river rapids ride at Dreamworld, a park on Queensland state’s Gold Coast, Queensland police officer Todd 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 if 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.

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.

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.

Copyright 2016 The Associated Press. All rights reserved. This material may not be published, broadcast, rewritten or redistributed.