Bill Millin, a Scottish bagpiper who braved mortar shells, raking machine guns and sniper fire to play morale-pumping tunes for his fellow commandos from the beaches of Normandy on D-Day, died Aug. 17 at a hospital in the English county of Devon after a stroke. He was 88.

Millin became part of Scottish folklore as soon as he jumped into the cold French water off Sword beach on June 6, 1944, during Operation Overlord. He later came to be known as the “mad piper.” His courageous actions were immortalized in the 1962 film adaptation of Cornelius Ryan’s historical account of the invasion, “The Longest Day,” starring John Wayne and Sean Connery.

Dressed in the kilt his father wore in World War I and armed with only a ceremonial dagger, Millin was a 21-year-old soldier attached to the 1st Special Service Brigade led by Lord Lovat.

Millin played rousing renditions of “Highland Laddie” and “Road to the Isles,” energizing the advancing troops and comforting the men whose last moments were spent on foreign soil.

“I shall never forget the skirl of Bill Millin’s pipes,” one Normandy survivor, Tom Duncan, later told the London Daily Telegraph. “It reminded us of home and why we were fighting for our lives and those of our loved ones.”

Marching along the crater-pocked sand was oddly a “relief,” Millin later said, compared with the boat ride to the shore, which had made him seasick.

Despite his brigade’s heavy casualties — nearly half of the 1,400 commandos were killed — Millin survived without a scratch.

His pipes, however, were wounded by shrapnel after a mortar round landed beside him. Luckily, it was a superficial injury and Millin patched up his pipes and carried on.