LOS ANGELES — Ruby, the city zoo’s oldest elephant, will be moved to an animal sanctuary after years of lobbying by animal-rights activists.

“Today, after 20 years of living here, and over 25,000 pounds of peanuts, I may add, we finally say goodbye,” Mayor Antonio Villaraigosa told a Los Angeles Zoo news conference Monday.

“I’ve said very clearly that I believe elephants should be in sanctuaries, and not in zoos. But it’s still a debate, it’s a conversation that we gotta have. So what we’ve done here is create a balance,” he said.

The mayor’s office said it would most likely take several weeks to complete Ruby’s move to the Performing Animal Welfare Society Elephant Sanctuary in San Andreas, southeast of Sacramento. The sanctuary offers 75 acres of rolling hills, plus a lake and mud holes.

Ruby, a 46-year-old African elephant, has been off-exhibit and living alone since the death of Gita, a 48-year-old female Asian elephant, last June.

Activists have long pressed officials to retire Ruby to a sanctuary, saying the giant animals simply do not have enough space at the zoo.

Zookeepers have said Ruby is in good health, and zoo director John Lewis has insisted that space alone is not the issue in caring for captive elephants.

Bob Barker, who pledged $300,000 in December toward housing Ruby at the sanctuary, applauded the mayor.

“I am delighted that Ruby is going to the PAWS sanctuary, where she will live a near as normal elephant life as possible as long as she is in captivity,” the retiring game show host and animal rights activist told The Associated Press by phone.

Elliot Katz, president of the group In Defense of Animals, said in a statement that Ruby’s move was “the right thing to do.”

After Gita’s death, a zoo investigation found that the animal’s keepers did not begin emergency procedures for more than eight hours after she was first observed sitting with her back legs tucked under her, a general sign of distress for the creatures.

The zoo is now in the midst of a private fundraising effort to help finance construction of a $39 million, 3.5-acre Asian elephant exhibit approved last year by the City Council.

Ruby’s departure will leave the zoo with only one elephant, Billy, a 22-year-old Asian bull, in residence and on exhibit.

Catharine Doyle of the Los Angeles Alliance for Elephants said she would like Billy to go to a sanctuary as well.

"The easy part is buying the body cameras and issuing them to the officers. They are not that expensive," said Jim Pasco, executive director at the National Fraternal Order of Police. "But storing all the data that they collect - that cost is extraordinary. The smaller the department, the tougher it tends to be for them."