The story so far: The Rev Alfred Fortescue has fled his pulpit during Midnight Mass on Christmas Eve 1889. The next day his daughter, Anne, approaches Sherlock Holmes for help. The only immediate clue would seem to lie with the presence of two strangers in the congregation.

Holmes makes another link, though, with a tragedy he recalls from some 20 years earlier. Fortescue, then a doctor in Liverpool, had engaged a certain Jane Smith as nursemaid to his baby daughter, after his wife Emily irrationally refused to accept the child. On Christmas Eve 1867 Emily Fortescue died in suspicious circumstances: Smith confessed that she had pushed the woman through the nursery window while trying to protect the child. The nurse was jailed for manslaughter.

At the time Holmes had visited Liverpool and spoken to Fortescue's former butler, who insisted that the doctor himself had been in the nursery at the moment the window shattered. Holmes spoke to Smith in prison, but she refused to answer his questions.

Just as Holmes finishes relating this history to Watson, a young man called Michael Chester arrives at the church, saying he and his wife were the strangers at the Midnight Mass. Holmes establishes that Chester is an orphan without links to Liverpool. He now informs Anne Fortescue that he knows where her father is, but will not tell her. He confides to Watson that Alfred Fortescue is about to face a terrible truth.

Holmes was silent for a long time, and appeared grave with concern as much as occupied by thought.

'The unravelling of this will cause pain, Watson,' he said finally. 'But unravelled it must be. I am sure I have the answer, and you will be privy to it. But anything you learn must be treated with the confidence of the confessional.'

'Of course,' I agreed. 'But where is Fortescue and why did you refuse to take his daughter to him?'

'Because she must never know the story,' he replied. 'Meanwhile, he should be allowed to reappear when he chooses. As to where he is, it was nearly midnight when he fled. Had he gone to the home of one of his parishioners, they would in charity have advised his daughter. A hotel would have been suspicious of an elderly vicar arriving in some distress and without luggage, and alerted the police. Similarly had he collapsed and been taken to a hospital dead or alive. No public transport is running, so he has not left the area.

'It is obvious that he can only have returned to this church. He entered through the vestry and prayed. When I asked you to imitate his movements during the service, I drew your attention to the pool of water near the altar, the result of snow melting from his shoes.'

'But why has he still not revealed himself?'

'He is greatly troubled in his mind and . . .' He stopped as we heard the clang of a bell, muffled inside the building but clearly audible in the silence. The note was followed by another, then a third, fainter this time. Holmes whirled on his heel.

'In God's name] Where is the ringing chamber?'

'I'm not certain,' I replied. 'But I know a similar church which has an entrance by the organ. If we tried the stairs from the lobby . . .'

But Holmes was gone, racing like a man possessed. I hurried after him and we emerged on the gallery by the organ, next to which was an iron spiral staircase, up which Holmes leapt with the speed of a cat. By the time I reached the door at the top, he was in the chamber. Hanging from one of the bell ropes was a figure in a long robe, a wooden crucifix suspended round his neck; Holmes had grasped his legs and was lifting the body as best he could to reduce the deadly pressure on the neck.

'The chair, Watson]' he shouted. 'Get him down]'

I stood on the chair and tugged at the simple noose, but the crude knot had tightened. I fumbled in my pocket for the sturdy army knife I carried out of old habit, snapped open the blade and cut the rope.

'I have him]' Holmes cried, and let Fortescue slide through his arms until he could drag his limp body to a wooden bench alongside the wall and lay him down. I felt for a pulse; the beat beneath the wrist was as faint and irregular as a butterfly's wing and the flesh around his thin lips was livid blue.

'He is not long for this world,' I said. 'He is bitterly cold, and now this . . .'

'Then may Heaven forgive me]' Holmes exclaimed. 'I had assumed he would have found warmth as well as shelter.'

He undid the knot and gently lifted the rope clear, then removed his coat and wrapped it around the vicar. Fortescue's eyes opened and he croaked an attempt at speech.

'Rest yourself,' Holmes told him. 'You may talk later.'

'He has very little time left in which to speak,' I said. 'He should do so while he can.'

'Yes,' Fortescue whispered. 'Mr Holmes, you must be my confessor.'

'I can grant no absolution.'

'Then your understanding will be the best I can hope for. How much do you know, sir?'

'Much, but there are gaps in my knowledge. Can you answer my questions?' The vicar nodded. 'How much did you hear of our conversations in the church?'

'Enough. When I heard voices, I crept into the organ loft, still lacking the courage to return. You must know that until I heard what you said this had been no more than an insane nightmare. When you said I had to face a terrible truth, I knew what it must be.'

'But I am still uncertain of parts of that truth,' Holmes told him. 'Where did you meet Jane Smith?'

Fortescue's face darkened. 'On the Liverpool dockside. She was standing beneath a riverside lamp. I knew what she was because I was seeking one. A young man is taught to temper his desires, but it is not always possible. After that first encounter I visited her regularly, during which time I began to have affection for her, although our relationship could never be more than what it was. Then she left Liverpool without explanation and I neither saw nor heard of her again for some two years.

'She returned as a patient at my dockside surgery shortly after I married. I was dismayed that she still followed the same sordid profession, but she pointed out that she had no choice. While intelligent, she was poor, ill-educated and without advantages. Her only skill was that of tending young children; as the eldest daughter of a large family, she had undertaken the care of younger brothers and sisters. When my wife refused to accept Anne, I realised I could offer Jane respectable employment. You must believe that there was no impropriety while she was under my roof.'

'But her appointment offended your wife,' Holmes remarked.

'I paid no regard to that. Emily had proved a bad wife and a worse mother; she would have resented whomsoever I had engaged. Jane was attentive and gentle to my daughter. That was all that mattered to me.'

'And the night your wife died,' Holmes said. 'Tell me if the theory Jane Smith rejected was correct. You wife had become dangerously unbalanced. She entered the nursery and in some manner threatened her child. Awakened by the disturbance, you went into the room and saw what was happening. Having ensured your daughter's safety, you attempted to calm your wife, but in the struggle, she fell through the window to her death.'

Fortescue shook his head. 'You are too charitable, Mr Holmes. I deliberately forced my wife through that window. She had threatened to kill our child and would do so again. Before the police arrived, Jane spoke to me. She said the truth would leave Anne parentless and insisted she must take the blame. If I supported her story that Emily's death was caused by her protecting Anne, there was a chance she would not hang. To save myself, I placed her life in peril. Although she escaped the executioner, I have never been able to flee my conscience. I entered the church as a form of penance.'

Holmes looked at me. 'You understand now why certain things must never be revealed, especially to Miss Fortescue.'

'Indeed,' I said, then turned to the vicar. 'But why did you attempt to take your life?'

'Mr Holmes knows that.'

'Yes,' my friend agreed. 'Had I realised you were listening, there were things I would not have said.'

'It does not matter now. I . . .' the vicar's breath caught in his throat and I felt for the pulse again, then shook my head at Holmes's anxious glance.

'You must . . .' Fortescue's voice was fading. 'Protect her as you have promised, Mr Holmes. I lied for the wrong reasons, but you must do so for the right ones. Condemn me only in your secret heart and let God . . .' He was gone, and Holmes looked at him with a great sadness.

'There were three principals in this tragedy, Watson,' he said. 'A wealthy doctor, a proud woman and a common prostitute. And the meanest of them was the noblest.'

'She is to be admired for taking the blame,' I admitted. 'And one hardly expects self-sacrifice from a woman of the streets.'

'You display the prejudices of our age, Watson. Can't you see the full extent of her sacrifice?'

'I acknowledge she sacrificed her freedom and . . .'

'Damn it, man]' Holmes cried. 'She did infinitely more than that. She sacrificed her child]'

'I don't understand.'

'You rarely do]' Holmes cried in a great emotion and whirled away. He stood for several moments with his back to me before speaking again. 'Forgive me, Watson. Your long loyalty deserves better, but this is a wretched business. Michael Chester is Jane Smith's son. The son who has grown to manhood while his mother has been incarcerated for a crime she did not commit. And when I saw the greyness in his eyes that is echoed in those of Anne Fortescue, I knew who his father must be. The vicar of St Andrew's, whose flock would condemn Jane Smith as shameful.

'He didn't know because she never told him. But last night, the anniversary of a tragedy he can never have forgotten, he looked across the pews and saw a face so like his own as a younger man that he fled in terror. Then he overheard my conversation with Michael Chester and began to guess the truth; he knew it when Chester told me when he had been born - the period during which Jane Smith was away from Liverpool. At that moment he recognised how much she had sacrificed, and a lifetime of remorse became too much to bear.'

'What will you tell Miss Fortescue - and Michael Chester?'

'Chester and his wife need know nothing, least of all that their attendance at this church led to his father's death. We shall tell them that the vicar perished in the cold and his actions are inexplicable. As for Miss Fortescue . . . is it possible an inquest might not detect that a rope has been about her father's neck?'

I stooped and pulled the stiff clerical collar away from the flesh; there were faint marks, but the symbol of his calling had protected him, and he had hanged for but a few moments.

'Unless a doctor was looking for them, they would probably be overlooked.'

'Then better some think I have failed than the truth be known,' Holmes said. 'Help me to bear him into the churchyard, where it may be supposed he died from the cold.'

Darkness had fallen and there was little danger of us being seen as we carried our burden. We laid him between two rows of gravestones, then hastened to the vicarage and said we had found him. Miss Fortescue was too distraught to pay any attention when Holmes expressed regret at being mistaken in all his reasonings, and we left her in the care of Sinclair and her staff. On leaving the vicarage we visited the house where Michael Chester and his wife were staying; they were dismayed and saddened at what we told them.

'I shall write to Jane Smith and request that she will see me again,' Holmes said as we returned to Baker Street. 'She is the only person who can answer what questions are left.'

I accompanied Holmes for the encounter at Holloway. Jane Smith bore the marks of long imprisonment, but retained the looks of a striking woman. When the wardress had left us, she took Holmes's letter from the pocket of her prison gown.

'Is my son a good man, Mr Holmes?'

'That was my impression. And with a kind-hearted wife.'

'I am pleased. When you visited me some years ago, I refused to answer your questions, but am prepared to do so now.'

Holmes nodded his appreciation. 'Why did you protect Alfred Fortescue?'

'For the same reason any woman would protect a man, whatever he had done. Because I loved him.' She saw my face. 'Yes, doctor. Such feelings are not expected among women of my profession, but they are possible. He was kind and considerate, and had our situations been different we might have married. But that was impossible.

'It was through me that he learnt of the deprivations my sort of people suffer and it was because of what I told him that he opened his charitable surgery. Our relationship continued - for true affection - until I knew I was with child. I could have demanded that he support me, but knew that if the truth emerged he would be ruined. I left Liverpool, bore my son and placed him in an orphanage, as I was unable to care for him myself. When I returned to the city, Alfred had married and later employed me.

'His wife was intolerable, and on the night of her death entered the nursery and threatened to kill her own daughter. When Alfred murdered her, I knew what I had to do. He protested, but he was always a man I could persuade.' She looked down at the letter again. 'You say you have protected Anne from the truth of this, for which I am grateful. She was not in my care for long, but I loved her.'

'I understand that you will be released soon,' Holmes said. 'I could assist you in tracing your son.'

Jane Smith shook her head. 'I have no right to reappear in his life after so long.'

'What will you do?'

She smiled grimly. 'I shall return to the streets, Mr Holmes. Apart from the few months I was Anne Fortescue's nurse, that is all society holds me worthy of.'

'I cannot allow that,' Holmes protested. 'Dr Watson and I have influential friends who would assist you.'

'Many of your friends, sir, will have only one interest in me,' she replied. 'I know a side of their respectable lives of which you gentlemen are ignorant.' She rose from her chair. 'I must now return to my cell.'

Holmes had stood up with her. 'I deem it an honour to have met you, Miss Smith,' he said. She bowed her head and was led away.

'You cannot add this case to your chronicles, Watson,' Holmes remarked. 'Fortescue's crime must remain unpublished for his daughter's sake - and your polite readers would be grossly offended at being asked to admire one they despise. But it is a pity that so remarkable a woman should be forgotten.'

As I write, I am an old man and our society is much changed, now for the worse, now for the better. Later in this 20th century, Holmes's admiration may be accepted and shared. Anne Fortescue married David Sinclair, who became an archdeacon; she recently died an honoured and beloved woman in the diocese. Jane Smith was beaten to death in an alleyway in Cheapside, and Holmes counted it one of his greatest regrets that he was never able to identify her murderer. At his expense, she was buried in a Sussex churchyard. He and I were her only mourners.

Robert Richardson is chairman of the Crime Writers' Association. His latest book, 'The Hand of Strange Children', which was shortlisted for the association's 1993 Gold Dagger, is published by Gollancz at pounds 14.99.