That was the situation last December when Air Force Capt. Mark Gongol and his wife and daughter were traveling from Des Moines to Denver aboard a United Boeing 737.
"I looked at my wife and she looked back at me and she said, 'I think you should ring the call button,'" Gongol told CNN on Tuesday.
Gongol, who pilots B1B Lancer bombers, already could tell something was wrong. Flight attendants were rushing to the front of the aircraft. One was carrying a first-aid kit.
When Gongol reached the cockpit, it was clear the captain was in trouble. Passengers and crew were helping him out of the cockpit. A cot had been set up. The captain looked pale and clammy from an apparent heart attack, Gongol remembered.
Gongol stepped onto the flight deck and came eye to eye with the first officer.
"There was a moment," he recalled. "We both had about five seconds to size each other up. She was wondering about my level of experience. Was I a Cessna driver -- or a professional pilot?
"I wanted to make sure she was OK. I had a feeling she was -- she was better than OK. She had already made the decision to turn the plane toward the nearest airport."
Gongol strapped himself in and did what he could to help get the plane to the airport in Omaha.
Never taking the controls, Gongol acted as a backup for the first officer. He worked the radio, communicating with air traffic controllers -- updating them on the condition of the captain, passengers and the aircraft.
Although he never suspected he would have to fly the plane, piloting a B1B bomber isn't too different from a 737, Gongol explained.
"A plane is a plane," he said. "It's like the difference between driving a pickup truck, or a sedan. The same skills transfer."
After landing, the airliner taxied as near a terminal gate as possible -- and ground crew maneuvered a rolling stairway to one of the plane's exits. The captain was rushed by ambulance for treatment.
After Gongol and his family got off the aircraft, they simply "slinked out the back door," with the Air Force pilot feeling confident he'd done all he could to help.
Gongol's story never surfaced until recently, when the Air Force received requests from news reporters.
Later Gongol received some good news: the captain had survived -- and recovered.
"The captain called me up a month or two later," Gongol remembered. "He said it was a really rotten event, but fortunately a lot of things fell into place."
And what did Gongol's wife say after this memorable flight? "She said, 'Good job,'" Gongol laughed. "She's a woman of few words. She was happy that I was there."