The hymn Eternal Father, Strong To Save will feature in the Duke of Edinburgh's funeral on Saturday, with the possible addition of a little-known extra verse at his request.
Better known as "For Those in Peril on the Sea" after the last line, the usually four-verse hymn is considered especially poignant by military sailors.
Rarely heard outside military circles, however, are two verses written specifically for aviators. They are inserted between the second and third verses. The additional words are understood to feature occasionally at Fleet Air Arm funerals, the aviation branch of the Royal Navy.
One such was sung at the funeral of the man who taught the Duke to fly, while he was a Royal Navy officer.
Unexpectedly turning up to the funeral many years ago, the Duke further surprised the congregation by singing, along with just a couple of other attendees, the unfamiliar words, which are not included in standard hymn books.
Eternal Father, Strong To Save was sung in 1979 at the funeral of Earl Mountbatten of Burma. The original lyrics were by William Whiting in 1860, with the tune added by clergyman John Bacchus Dykes in 1861.
Mr Whiting, a former Winchester College Chorister's School master, was inspired by the nautical Psalm 107. He penned the lyrics as a poem for a student afraid of an overseas voyage.
The two additional verses possibly being used on Saturday are thought to have been written by Emma Mayhew Whiting and Mary CD Hamilton, in 1943 and 1915 respectively. Ms Mayhew Whiting, a North American poet, was known for her writing about the wives of whaling captains.
Ms Hamilton was a Scottish writer and poet and the lyrics of her verse were written as a prayer during the First World War.
Buckingham Palace is expected to release details of the order of service on Thursday and would not comment on which hymns may be used.
However, it is thought the Duke left specific instructions for his funeral arrangements, including the use of a specially modified Land Rover to carry his coffin. As such he may well have asked for the hymn to be sung out of respect for the Royal Navy, with the Fleet Air Arm similarly highlighted.