They fed her some final treats of bok choy and celery. They scratched her back with a rake. Then early Friday morning, veterinarians at the National Zoo put their suffering 72-year-old Asian elephant, Ambika, to sleep.

She had been a fixture at the zoo for 59 years and was the third-oldest Asian elephant in the captive population in North America, the zoo said.

Her keepers called her “the queen.”

Her euthanasia was done with drugs, the same kind used to put down a pet, and took place in the elephant barn, out of sight of her compound mates Bozie, 45, and Shanthi, 44, the zoo said.

She was first sedated at about 8:15 a.m., and after she laid down, the euthanasia drugs were administered. She died around 9:15 a.m., her longtime keeper Marie Galloway said.

Bozie and Shanthi were then permitted to have some time with her body. They were curious but did not dramatically react, the zoo said.

“I feel like it was completely right,” said Galloway, an elephant manager who had been Ambika’s keeper for 33 years. “For me personally, it was similar to when my mother died at 88 . . . comfortably at home. Ambika went much the same way.

“The time was right. Her discomfort was evident. She appeared to be tired and in pain. . . . She’s a very social elephant. She’s an elephant’s elephant, and a people’s elephant. She loves her interaction. And to see that disappearing . . .

“So we gave her a gift of peace from that. She was comfortable and relaxed the entire way through.”

Keepers and veterinarians wore masks and gloves.

“We brought her into one of the stalls where we planned to do it,” Galloway said. “She was eating bok choy the whole time and a little bit of celery, and we used that to keep her in place. It was just the right spot for her to go down without hitting walls.”

Ambika often slept standing up. And when she was given the initial sedation, “we expected that she would try very hard to stay in a standing position,” Galloway said.

“She set her legs and pressed her head against the bollards in front of her,” she said. “You could see her just wanting to lay down . . . a little tremor went through her body and she just gave in to the wish to lay down and went down.”

Blood samples were taken, and the zoo’s chief veterinarian, Don Neiffer, gave the euthanasia drugs.

“Once that stuff is given, the vets confirm that she indeed has passed,” said senior curator and elephant specialist Bryan Amaral.

“We look for breaths and of course we look for heartbeat,” he said. “At that point everybody can have a few quiet moments with her.”

Galloway said: “It went as well as it possibly could. She was surrounded by her whole team of keepers.

“The hard part for us was not hugging each other,” because of the virus restrictions.

Ambika was a cautious elephant and not a matriarch. But she “was very wise,” Galloway said. “She knew a lot about how to be an elephant. . . . She was able to teach by example.”

Her roughly 6,500-pound remains were removed from the zoo late Friday night with a front end loader and a truck and taken to a facility where a necropsy, an autopsy for an animal, was underway Saturday.

The remains were to be “disarticulated” and incinerated. “It’s a huge job,” Amaral said. No ashes will be kept for sentimental reasons.

It was the second euthanization of an animal at the zoo this month. An American bison named Zora had to be put down March 3 after she thrashed in a stall and broke her left hind leg. She was 7 and had been at the zoo for six years.

Ambika, one of seven elephants the zoo had, had been ailing in recent months.

She had been treated for osteoarthritis a decade ago, but the staff was able to ease her pain and slow the progression of the disease, the zoo said.

She received anti-inflammatory drugs, analgesics and joint supplements. But she also began to develop lesions on her footpads and nails.

For those, she got foot baths, pedicures and antibiotics. But the lesions could not be controlled and got worse, the zoo said.

“Last week, her keepers noticed that her right-front leg, which bore the brunt of her weight, developed a curve that weakened her ability to stand,” the zoo said in a statement.

Given those factors, as well as her age, physical and social decline, and poor quality of life, the staff decided to euthanize her, the zoo said.

“We were at a point where we knew this was the best option for her,” Amaral said.

Ambika was captured in India at 8 and worked for years as a logging elephant. She came to the zoo in 1961, during the administration of President John F. Kennedy.

“It’s sad in a lot of ways,” Amaral said. “They don’t get much sweeter than she was. . . . It’s the end of an era, 59 years at the National Zoo. . . . Seventy-two years for an elephant is a pretty good run.

“We did good by her, and she did good by us.”