WASHINGTON — Bei Bei, the Smithsonian National Zoo’s giant panda cub, underwent emergency bowel obstruction surgery this week, zoo officials confirmed.

Veterinarians removed a “dense, lemon-sized mass of bamboo.”

The Smithsonian said in a statement that the “life-saving” surgery was performed Friday.

“I’m extremely proud and thankful for our team of keepers, veterinarians, animal care staff, volunteer medical experts and all staff who have helped facilitate the urgent response,” Director Dennis Kelly said.

Zoo officials said Bei Bei started showing signs of stomach discomfort and was vomiting Thursday. The year-old panda wasn’t eating and slept more than usual.

Veterinarians found the blockage at the top of his small intestine Friday morning during an ultrasound.

Bei Bei is now recovering. He’ll be given water overnight and then will transition to soft foods, like pears, leaf-eater biscuits, and sweet potatoes, which zoo officials previously said was one of his favorite foods.

“Bei Bei’s prognosis is very good,” Kelly said. “The challenge will be for our team to monitor him safely, and that requires his cooperation.”

The zoo said it will post daily updates on Bei Bei’s recovery on social media.

Over the next several days, Bei Bei will be housed separately from his mother and will not appear on the National Zoo’s panda cams. The panda house will be temporarily closed while he recovers. Visitors can still see Bao Bao, Mei Xiang, and Tian Tian in the outdoor yards.