This timeless hymn was written by the Anglican curate, Reverend Augustus Toplady (1740-1778) after taking a walk at Burrington Combe, a steep limestone valley with many caves in Somerset, South West England. A mighty thunderstorm blew up and the curate found an opening in an immense granite rock, in which he sheltered from the storm. This inspired the imagery of Christ as a sheltering rock. The hymn was first published in the Gospel Magazine in 1775, some 12 years after Toplady wrote it.
Despite being converted under a Methodist evangelist while attending the University of Dublin, the Calvinist Toplady rejected Charles and John Wesleys' theology and waged a running battle with them through tracts, sermons, and even hymns. He later softened his stance a little and two years before he died of tuberculosis and overwork at the age of thirty-eight, Toplady published his own hymnal, in which this classic hymn and Charles Wesley's "Jesus, Lover of My Soul" were placed side by side.
The hymn was a favourite of Prince Albert, who asked it to be played to him on his deathbed, as did Confederate Genera J.E.B. Stuart. The British Prime Minister William Gladstone did a Latin translation 'Jesus, pro me perforatus' and it was later played at his funeral.
The hymn is usually sung to the tune of "Toplady" by the American composer Thomas Hastings (1784-1872).
Many gospel and inspirational artists have recorded versions of this hymn including Johnny Cash, Patti Page, Chris Rice and Mahalia Jackson.