After nearly two hours, crews were able to rescue a dog stuck in the Los Angeles River Monday afternoon in the Studio City area.

The rescue effort of a dog and a woman was reported by the Los Angeles Fire Department at 2:13 p.m., and it wasn’t until just after 4 p.m. that the dog was pulled out of the fast-moving stream that was swelled by a rainstorm.

A 35-year-old woman, the dog’s owner, was rescued within 30 minutes, but the animal remained in the water.

A rope system was used to lower one firefighter over the edge of the river, who was able to get a rescue ring to the woman. She abandoned the life ring in efforts to keep hold of her dog, LAFD said.

An LAFD air unit lowered a rescuer from a helicopter and secured the woman and then tracked the large dog downriver.

Once the dog was located, a rescuer was lowered and they captured the dog. But the scared animal fought the rescuer and broke loose, LAFD said.

Ground crews were redeployed down river as the helicopter tracked the dog and attempted a different rescue opportunity. During this time a bystander entered the water, LAFD said.

Sky5 was overheard as the man appeared to jump into the water to grab the dog. He was able to grab the pup, but the two were swept downstream.

The man grabbed hold of a rope sent down to him, and a rescuer was then lowered into the river and successfully got the man out.

It was not immediately clear whether the man had any connection to the dog.

The LAFD advised people not to go into the stream to try to rescue the dog, as it will divert their resources.

The dog continued to tread the swift water and was often able to walk in shallower areas as people gathered to watch along the river. At least two rescuers were in the water but the dog turned and ran away from them.

As firefighters caught up to the dog at Gilligan’s Island Road and Gunsmoke Avenue, the dog tried to get away and run in the opposite direction but it floated downstream. Just after 4 p.m., the four rescuers were able to surround the dog as it got swept downstream. They threw a rope around his neck and pulled him in.

The dog was secured by the firefighters and brought up to the surface. Crews appeared to be putting a muzzle on the dog, as it could be seen trying to bite them.

The bystander who went in the water earlier and required rescue was transported to the hospital with dog bite wounds, officials said. The first rescue did not require transport.

The incident came as a late March storm brought a significant amount of rain to the area Monday. Rainfall amounts between 1 to 2 inches were predicted for most coastal and valley locations in Southern California.