Dr. Peter M. Guida, a retired cardiothoracic surgeon praised as a mentor to generations of medical students and residents, died April 20 at home in Lloyd Harbor at age 88.

The cause of death was liver cancer, said his widow Bernadette Castro, a businesswoman and former New York state parks commissioner. Two years ago, he was diagnosed with Alzheimer’s disease.

Guida was an associate professor of surgery and associate attending surgeon at New York-Presbyterian Hospital and Weill Cornell Medical Center, where he worked for more than 60 years before retiring in 2005.

He performed more than 20,000 major medical operations, including The New York Hospital’s first aortic aneurysm and first open-heart surgery. He founded its Division of Cardiac, Vascular and Thoracic Surgery.

‘‘He was the consummate gentleman surgeon, a superb technician and a role model for his colleagues and the residents who trained under him,’’ said Dr. Leonard Girardi, cardiothoracic surgeon-in-chief at the hospital and chair of the department of cardiothoracic surgery at Weill Cornell. His combination of compassion and confidence were “very inspirational.’’

For his wife, he was “truly sent from heaven.” When they met in 1978, he was a widower with two children, she going through a divorce, and neither expected to remarry. It was love at first sight, said Castro, who gained fame as the little girl opening the sleeper couch in the original Castro Convertibles TV ads, and they wed in March 1979.

advertisement | advertise on newsday

He was, she said, a gentle and loving stepfather to her four children. “There was something very special about this man.”

He was born July 18, 1928, in New York City, and attended public schools before enlisting, at 17, in the Navy during World War II. He flew Grumman F6F Hellcats off the aircraft carrier Essex in the South Pacific, and went on to pilot a single-engine Beechcraft Bonanza into his eighties. For over 35 years he was a senior flight medical examiner for the Federal Aviation Administration.

He attended Long Island University under the G.I. Bill as a pre-med student, graduated with honors from Albany Medical College and, in 1954, entered the surgical resident training program at Cornell Medical College and The New York Hospital.

In addition to his widow, survivors include daughter, Patricia Guida May of Lloyd Harbor; son, Peter M. Guida Jr., Ph.D, of Albertson; stepdaughter Terri Austin Keogh; stepsons David Austin, Jonathan Austin and Bernard Austin; two grandchildren; eight step-grandchildren; and nieces and nephews.

Guida was predeceased by his first wife Jennie Josephine Guida, his parents, a sister and brother. He was interred at Cemetery of the Holy Rood in Westbury.