Three family members were hurt, one of them critically, after a log ride at an amusement park in Riverside, California, malfunctioned Saturday afternoon.

The accident occurred at Castle Park around 4:30 p.m., according to the Riverside Fire Department.

The log ride flipped over with a mother, father and their son inside, according to NBC Los Angeles. The mother was ejected from the ride, the fire department said.

Castle Park said the ride's water pump experienced a mechanical failure.

The three victims were taken to Riverside Community Hospital Trauma Center.

The ride was shut down but the park is open. The Division of Occupational Safety and Health (DOSH) will conduct an inspection and investigation of the ride.

Castle Park told NBC Los Angeles it is also investigating the cause of the incident.

"First and foremost — our thoughts and prayers are with the guests involved," Castle Park said in a statement. "Safety is our number one priority and we have begun conducting a full investigation."

Every ride is inspected and signed off before it opens on a daily basis, a company spokeswoman also told the outlet.

Castle Park was founded in 1976, according to its website.