Judge Francis Aglionby took pity on Charles Cowden, 74, after hearing he staged the raid on the Harpenden Building Society in Radlett, Hertfordshire - armed with an air pistol, two smoke grenades and a knife - in an effort to save a sick female friend from spending the rest of her life in an old people's home.
Giving him a two-year jail sentence, suspended for two years, the judge told Cowden that he could not recollect ever having been involved in a case where a person convicted of an offence involving weapons 'had not been sent to prison for a long time.
'But it seems to me that despite the fact that society's disapproval of this kind of activity has to be marked with a heavy sentence of imprisonment, there are a sufficient number of peculiar factors in your case which allow me to take a course of mercy.'
The judge said Cowden, of Kilburn, north-west London, was not a fit man and he was providing constant attention for Rosie Hiscock, also 74 - with whom he had lived for 20 years - who was 'grievously afflicted' with various medical conditions.
As he left court Scots-born Cowden, who admitted attempted robbery and possessing a firearm, said: 'The judge has been very fair. A prison sentence would have been a death sentence for me and for Mrs Hiscock.'