Between May 1917 and May 1918 Stanford produced no fewer than five organ sonatas, all of which, in three movements, were published by Stainer & Bell. Although by this time he had written much for the instrument, he had never before visited this genre, and with the war severely limiting access to other creative spheres (such as the orchestra), the opportunity to compose extended works – in many ways symphonies-manquées – for the organ clearly appealed to him.
The Organ Sonata No. 1 Op. 149 was completed in May 1917 and dedicated ‘To my old friend Alan Gray.’ As implied by the dedication, Stanford had known Gray for many years. Three years younger, Gray had been a law undergraduate at Trinity during the 1870s while Stanford was the college’s recently-appointed organist, and had regularly assisted at services as well as giving the occasional organ recital. In 1883 Gray moved to Wellington College where he was Director of Music for ten years. Then, with Stanford’s resignation at Trinity, Gray was appointed (in preference to Stanford’s assistant at the time, Thomas Tertius Noble) and held the post until his own retirement in 1930.