Col. Robert Grimes, an Army Air Forces pilot who evaded capture in World War II when his B-17 bomber was shot down over Nazi territory, died April 21 at his home at Fort Belvoir, Va., of complications from prostate cancer. He was 87.

On Oct. 20, 1943, the target was a bomb manufacturing plant near Aachen, Germany. Nazi fighter planes zoomed in when Grimes experienced engine trouble over central Belgium. Cannon fire destroyed the plane’s tail, and he struggled for control.

As he sounded the alarm, not realizing he had been wounded in the leg by machine-gun fire, he held a slow circle and fought for crucial seconds so the crew could jump free of the stricken plane. He was the last to bail out before the B-17 crashed into a field close to a Luftwaffe base, 35 miles southwest of Brussels.

Grimes later learned that four of his crewmen were killed in action, but five had survived the crash.

“You never stop thinking about it,” he said in a 2004 interview. “In my mind, I’m back in the cockpit, left seat, looking at the controls, and I’m dodging and diving around the Nazi fighters, trying to make it to a cloud bank. And I look for every option, but I never come up with anything to save us.”

He hid in the brush until dark, when farmers saved him, knowing the penalty for harboring airmen was execution. He was handed over to members of the Comet Line, a civilian escape organization that saved an estimated 700 airmen during the war. A young member of the organization, Micheline Dumont, arranged for a doctor to remove a bullet from his leg and nursed him back to health.

In mid-December, Comet operatives provided forged Belgian and French identity papers and led him on foot, by bicycle and train to a village near the French-Spanish border. Basque guides took Grimes and several other airmen on an overnight hike in the freezing rain through the Pyrenees. He and his companions waded to safety across the Bidassoa River into Spain before dawn Dec. 23, pursued by Nazi patrols and facing fire from border guards.