A female dog was rescued Sunday after she fell into a 30-foot well in the Santa Monica mountains in Malibu, according to a Los Angeles County spokesman.

Lucy, a 13-year-old Welsh Terrier, fell into the dirt well near the 27200 block of Winding Way about 11:45 a.m., according to fire department spokesman Brian Jordan.

*Animal Rescue in Malibu. USAR 103 with the save, no injuries to dog or rescuers. Keep your pet on a leash👍🐶 #rescue #LACoFD #USAR @LACo_FD pic.twitter.com/4cODCOi1MT — L.A. County Fire Department (@LACoFDPIO) April 2, 2017

Lucy was not injured in the fall, according to Jordan.

The department dispatched its Urban Search and Rescue team to the scene but it took them about two hours to get there because of traffic, according to Jordan.

The county fire team then lowered one firefighter down into the well to make the rescue, Jordan said.

The Mountains Recreation and Conservation Authority also assisted with the rescue.

The entire operation was finished about 5 p.m., according to county fire Dispatch Supervisor Cheryl Sims.

The department warned pet owners to keep their dogs on a leash when they are hiking on trails through the mountains.