After his return to England in 1815, Davy began experimenting with lamps that could be used safely in coal mines. The Revd Dr Robert Gray of Bishopwearmouth in Sunderland, founder of the Society for Preventing Accidents in Coalmines, had written to Davy suggesting that he might use his extensive stores of chemical knowledge to address the issue of mining explosions caused by firedamp, or methane mixed with oxygen, which was often ignited by the open flames of the lamps then used by miners. Incidents such as the Felling mine disaster of 1812 near Newcastle, in which 92 men were killed, not only caused great loss of life among miners but also meant that their widows and children had to be supported by the public purse. The Revd Gray and a fellow clergyman also working in a north-east mining area, the Revd John Hodgson of Jarrow, were keen that action should be taken to improve underground lighting and especially the lamps used by miners.
Davy conceived of using an iron gauze to enclose a lamps flame, and so prevent the methane burning inside the lamp from passing out to the general atmosphere. Although the idea of the safety lamp had already been demonstrated by William Reid Clanny and by the then unknown (but later very famous) engineer George Stephenson, Davys use of wire gauze to prevent the spread of flame was used by many other inventors in their later designs. George Stephenson's lamp was very popular in the north-east coalfields, and used the same principle of preventing the flame reaching the general atmosphere, but by different means. Unfortunately, although the new design of gauze lamp initially did seem to offer protection, it gave much less light, and quickly deteriorated in the wet conditions of most pits. Rusting of the gauze quickly made the lamp unsafe, and the number of deaths from firedamp explosions rose yet further.
There was some discussion as to whether Davy had discovered the principles behind his lamp without the help of the work of Smithson Tennant, but it was generally agreed that the work of the two men had been independent. Davy refused to patent the lamp, and its invention led to his being awarded the Rumford medal in 1816.