Summing up the case for the defence, Sydney Kentridge QC, told Winchester Crown Court that the primary intention of Nigel Cox when he administered a fatal dose of potassium chloride to Lillian Boyes was to relieve her suffering and not to kill her.
Dr Cox, 47, a consultant rheumatologist at the Royal Hampshire County Hospital, denies the charge. Mrs Boyes, 70, who had acute rheumatoid arthritis when she was given the injection in August last year, had asked him to help her die.
Mr Kentridge said that the case rested on a 'razor's edge', a very fine distinction between actions which a doctor could or could not legally take.
Without the injection, he said, Mrs Boyes, who was close to death, would have died in a 'dreadful, gasping, painful' state. Instead, Dr Cox had alleviated her pain for a short time which, although it lasted only minutes, was 'as valuable and important as hours or days'.
'She was allowed to come to a peaceful, calm and dignified end in the presence of her sons,' he said. 'That is Dr Cox's alleged crime.'
Mr Kentridge said that, during 13 years of caring for Mrs Boyes, the defendant's main concern had been to relieve her suffering and expert witnesses had testified that the final injection achieved that purpose.
The case was not about euthanasia or medical ethics, he said. It was about one patient and one doctor - 'an understanding and selfless physician whose whole career had been devoted to the saving of life and the relief of pain' - driven to unorthodox action.
Neil Butterfield QC, summing up for the prosecution, told the jury that they were trying 'a desperately sad and distressing case' but that they must set aside their emotions and prejudices.
He said that while Dr Cox's motives in administering the potassium chloride had been 'honourable and decent', they were irrelevant. The only issue was whether his primary intention had been to end Mrs Boyes' life and all the evidence pointed to that conclusion.
Mr Butterfield said that there had been a close bond between Dr Cox and Mrs Boyes but that he had broken his promise that she would not suffer and was under great pressure to hasten her death.
'Moved by compassion, he prepared in these most harrowing circumstances to break the ethics of his profession and the law.'
He said that killing patients to end their suffering was unacceptable both to the law and the medical profession. 'Doctors don't want it because of the appalling dilemmas it would put them in and the pressures they would experience from relatives.'
Witnesses had testified that it had been Dr Cox's duty to ensure that Mrs Boyes died with dignity and minimimal suffering. 'That was the extent of his duty; thus far and no further.'
Mr Butterfield said there was sometimes an exaggerated view of the skill and expertise of the medical profession. 'Medicine does fail sometimes, with tragic results to those involved.'
A verdict is expected today.