When Casey Wells began working as a server at The Wharf Pub three summers ago, she enrolled in a CPR training course offered by the University of South Carolina School of Public Health, where the West Tisbury resident is now a rising senior.

On Sunday during a dinner rush at The Wharf, that training helped save a life as Ms. Wells leaped into action when a customer began choking. Ms. Wells said she overheard the customer’s strained coughs and the concerns from other diners and went to check on the situation.

“She wasn’t responding, and then when I asked her she did the symbol for choking and grabbed her neck,” Ms. Wells said a few days after the incident.

Ms. Wells performed the Heimlich maneuver twice on the customer before the piece of food was dislodged.

“[At school] they talk about always being prepared for emergencies,” she said. “I thought that I would take the class just in case and I’m very glad that I did. Otherwise, I wouldn’t have had any idea what to do.”

After the episode, the patron was even able to finish her meal, comforted by her friends, Ms. Wells recalled.

“I’m sure someone else would have stepped in if I hadn’t, but I’m sure lucky I happened to be there,” she said.