Sherlock Holmes is, as you might well know, a virtuoso violinist and something of a fan of the great composers, especially works for string orchestra. When he is not out on detective work, or playing his violin in his own peculiar manner, or meditating in our shared lounge, he is at any concert for which he can get his hands on tickets. I can't say I'm into classical music much myself, but I don't mind going with him to the occasional concert.

One evening in early May he announced to me that the renowned Eboracum Philharmonic Orchestra would be coming to a nearby theatre, and that he had got us both tickets. I was surprised but not displeased: an evening at a concert would be a welcome rest after a busy time recently. The programme was decent: it included such ravishing delights (as Sherlock called them) as Vaughan Williams's Lark Ascending, Mozart's concerto for flute and harp, and the complete Concierto de Aranjuez by Rodrigo. The first two would include soloists from the orchestra; the last would be headed by the famous classical guitarist William Johnson.

So the line-up was star-studded. To top it all off, the conductor would be Gillian Bramley, more famous perhaps than Johnson, who had composed and recorded the popular album-trilogy Sea Pieces a few years ago, and who was a figurehead for women in classical music. This was the very limit of my knowledge; I am no expert. That is Sherlock.

I let Sherlock be excited about the concert. He is at his happiest only at a concert, when he is not in the middle of a case.

Little did we know that this would be both.

We were not late, but the theatre was already rather full when we entered. We found our seats, which were good ones (Sherlock has a tendency to get good seats), and I took off my jacket whilst Sherlock escaped from the heavy greatcoat that he always insists on wearing.

'Must have been a sell-out,' I remarked, looking over the crowd of people.

'The Eboracum Phil is very popular,' Sherlock said. His voice was vague: he was engaging in his usual habit of taking in every detail around him. I knew that, had he the time, he could probably tell me the occupation of everyone there, as well as a few obscure facts that even the person himself might not consciously know.

His eyes then settled on the orchestra. It was a hundred-strong group of musicians, all sitting ready on the stage, chatting amongst themselves. Before them was the podium on which the conductor would stand when she emerged from the wings.

Just before the concert began, Sherlock got out his phone and clandestinely typed something, his fingers dancing over the keypad. For a minute he scrutinised the screen; then he turned his phone off and slipped it back into his pocket. I raised one eyebrow at him; he merely returned the gesture.

But I forgot this furtive action for the moment as applause began to ring out; I looked forward and saw Gillian Bramley making her way to the podium. She stood upon it and faced the audience, curtseying elegantly; the clapping gradually died down.

'She's very young,' I commented in a whisper.

'Twenty-seven,' Sherlock told me. 'But a veritable genius.'

The orchestra tuned themselves to the oboe; the audience hushed. Then Gillian addressed us thus: 'Ladies and gentlemen, I give you our first soloist, Geoffrey Perceval.'

Applause again. A gentleman in the most immaculate suit stood and bowed; then he came forwards and raised his violin to his shoulder. The Lark Ascending began, and he played effortlessly, sweeping over every beautiful note with spectacular ease. I watched as Sherlock sat back with a somewhat dreamy expression on his face; I did not often accompany him to concerts, as you know, but I knew that this was his usual concert-face. For my part, I was not quite as hypnotised, though I enjoyed the piece greatly.

Sherlock was similarly enraptured during the flute and harp concerto, which featured a pair of equally talented soloists. Here I paid more attention, however, to Gillian Bramley, who was an excellent leader, as Sherlock had told me she would be.

This was followed by a brief interval whilst the musicians tended to their instruments and the conductor went for a drink. I did the same, bringing back tea and biscuits for Sherlock and me.

'It must be hard work,' I remarked, 'being a conductor.'

'It is if you're as lively as Gillian Bramley,' Sherlock replied.

I chuckled. The pieces had not been fast ones, but Gillian had indeed been rather lively. It was clear that she loved her job. Being famous was, I supposed, just a bonus.

'What's William Johnson like?' I asked a minute later, nibbling at my biscuit.

'Captivating,' was Sherlock's reply.

The second half began; Gillian emerged once again from the wings, this time accompanied by the evening's special guest. William Johnson was greeted by cheering and the most thunderous round of applause. I recognised him: he was quite old but the twinkle in his eye was that of a much younger man. He smiled round at the audience, and many people around could not help smiling back.

'He is soon to retire,' Sherlock told me. 'It will be a great shame. He's very popular.'

I could see and hear why when the piece began. The Concierto de Aranjuez is a favourite, at once both carefree and beautiful, and the themes are well-known. William Johnson was as good as Sherlock had promised: his fingers flew over the strings, and he never faltered.

Never faltered, that is, until halfway through the second movement.

It was the slowest of the movements: a serene, romantic piece that you would probably recognise. I relaxed, along with most of the audience. We were completely unprepared.

All of a sudden there was a gunshot.

The piece stopped abruptly. Everyone's glances went towards the left of the stage, where a bullet had lodged itself in the wooden panel there. Nobody had been hit.

There was a second gunshot. The sound of someone running away. Then William Johnson let out a strangled cry and fell backwards onto the floor.

I leapt up, along with many others. Somebody screamed. Gillian Bramley, remarkably calm, went over to the guitarist; after a moment she called for help from anyone who could. It was at that moment that it occurred to me that I was a doctor. I could help. I sprang to heel, watching as Geoffrey Perceval, the lead violinist, called the emergency services.

The audience descended into anarchy. It was all I could do to push through the aisles to reach the stage. Shouting, movement, a mad dash for the exits by the faint-hearted; in the chaos I looked around for Sherlock. He wasn't there; he had probably gone after the gunman.

It was an insane situation. William Johnson had been shot – it looked like an assassination attempt to me, considering the high-profile nature, but I reminded myself not to get too imaginative. Could this even be real? I found myself pinching myself. But I could not delay in my job: it was my duty to help.

William Johnson was unconscious, I noted quickly, but still breathing, albeit shallowly. The bullet had not penetrated his heart or any internal organs; it had in fact come close to missing again. The wound was in the man's shoulder. I winced automatically; I knew exactly the effect of that particular wound. A gunshot to the left shoulder… it brought back memories. However, I did not dwell on that. I got to work with the materials from a first-aid box somebody had found, hoping somehow to forestall any issues until the ambulance arrived. Plasters and a bandage don't usually help much in these sorts of situations.

Luckily a police car and an ambulance soon arrived, pulling up outside the theatre at pretty much the same moment. I was congratulated when they arrived for my skills; I had to explain that I was in fact a doctor.

'I think he'll survive,' I said to the emergency crew as they took William Johnson away on a stretcher. It wasn't a murder after all: I was somewhat relieved. It had been a fairly botched attempt at murder – but – I hoped the gunman would realise that he had failed. And then be arrested. An anti-climax to the whole story really.

Geoffrey Perceval, one of the few members of the orchestra still on the stage, stepped forwards to detail the situation to the police. I turned to Gillian, who was standing with a resolute expression on her face but shaking terribly. I suspected mild shock. Quickly I went over to her and asked her if she was all right.

'Yes, I'm fine,' she said, her voice trembling as much as she was. 'Who are you?'

'I'm a doctor – Doctor John Watson,' I told her. 'Are you sure you're all right? You look as if you could do with a hot drink.'

'I'm fine,' she said again. 'Thank you for your concern, but I'll be all right.'

'My friend went after the gunman,' I told her. 'He –' I paused, because I didn't actually have any idea where Sherlock was.

'Speak of the devil,' I said a moment later. Sherlock had returned; he dashed onto the stage, sans gunman, and went straight over to the opposite wall: the one that the first bullet had hit.

He held his finger at the level of the bullet, and his eyes swivelled round to the chairs on which the orchestra had sat. He seemed to be tracing its trajectory. I was by now used to Sherlock's bizarre behaviour; the others on the stage stared at him. The policemen however did not disturb him: I think they recognised him. I noticed that some looked somewhat annoyed. They usually do when Sherlock appears.

'Gillian!' he said suddenly, pointing to the conductor with his free hand. She jumped. 'Stand on the podium a moment.'

She leapt unquestioningly to his request. He held his finger in the air, and suddenly beamed.

'I think,' he said, 'that I might be right.'

'As usual,' I muttered to myself. Gillian heard me and shot me the smallest of smiles. Sometimes Sherlock was the most irritating bighead. The really annoying thing was that when he said he was right he always was.

My friend turned to the bewildered policemen. 'The gunman could walk right into your hands,' he said. 'Keep an eye out. He's quite tall, unmasked, and probably still carrying his gun. Oh, and he's a rotten shot.'

And with that he motioned for both me and Gillian to follow him.

'You saw the gunman, didn't you,' I said to Sherlock as we came to the door of our flat. It was not a question. I wanted him to admit that he'd seen the gunman and knew who he was – just to reduce the drama of his final statement.

'No,' Sherlock replied. 'I was guessing. But if my guess turns out to be right, then…' He turned to Gillian, who was more bemused than shocked now. I could sense one of Sherlock's perceptive deductions coming; I wondered if I should warn her.

The silence was tense. Sherlock pushed open the door and we all went in. When we were all in the lounge Sherlock hung up his coat, straightened his collar and sat down. I put the kettle on: we all needed something to steady our nerves.

The kettle began to hiss. Sherlock's gaze fell on Gillian; she asked the most direct of questions.

'Why am I here?' she said.

'To prevent a murder from happening,' he replied.

She stared at him, bewildered. I knew exactly how she was feeling. I brought the tea-tray over and sat down myself; I offered her a mug. She picked one up and took a very small sip. Her eyes questioned Sherlock with the most intensive curiosity and confusion.

'He wasn't aiming at William Johnson.'

Sherlock leaned back, seeming satisfied, though with what I did not know. 'Not the first time, anyway. What can you tell me about your missing cellist?'

The change in subject threw both me and Gillian. She narrowed her eyebrows and at great length spoke.

'Missing… oh, you mean Marcus? Marcus Thompson?' Gillian blinked. 'He's ill. He couldn't come down… Were you counting the people in…?' The answer was obvious; she did not finish the sentence. I remembered Sherlock's intense scrutiny of the musicians at the start of the evening – it felt like days ago now. Why had he been counting them? I knew better than to ask.

'Who is he?' Sherlock asked of her.

'Marcus? He's… a cellist. A fine cellist. He used to be… why do you need to know this?'

'Is he part of the family of Harold Thompson?'

'Yes. A son.' She raised one eyebrow. 'He still lives up at the grange – Grange Manor, I mean.'

'An aristocrat.' Sherlock was intrigued. 'Does he ever go hunting?'

At this, more than a hint of a smile appeared on her face. 'Apparently not. His brother says that he's a rotten…' The smile faded as quickly as it had come.

'We have our man,' Sherlock declared. He could not have been more certain. He spread his hands, as if inviting applause; none came.

'Marcus? Marcus Thompson? Why would he try to – who are you? You're mad!' Gillian cried.

Sherlock smiled enigmatically. Then he put his hand in his pocket and drew out a rolled-up piece of paper. He flattened it out on the table; it was a poster for the concert.

I glanced at it:

A Springtime Selection

with the Eboracum Philharmonic

The Lark Ascending.

Flute and Harp Concerto.

Concierto de Aranjuez.

With guest soloist

William Johnson

Conducted by

Gillian Bramley

Underneath Gillian's name, someone had scrawled Because she always gets all the credit.

She drew in a sharp breath. 'Who wrote that?'

Sherlock's eyes met hers. 'Your murderer. Where is it that you're staying?'

She told him; Sherlock looked delighted. He whipped his phone out, dialled a number, went into the kitchen and spoke briefly. Then he returned; his smile widened.

'I really hope I'm right,' he said. 'It would look quite stupid if not.'

We didn't hear much about Marcus Thompson's arrest apart from the information that was in the local news the next morning. He had been stopped, still in possession of a weapon – a hunting-rifle – outside of the very hotel that Gillian had named, and he had confessed to shooting William Johnson.

Not long after Sherlock had rung the police, he had suggested that we get some sleep; he had advised Gillian to stay at our apartment overnight – she slept on the sofa – so that she could remain safe until the arrest.

Because, as he had told us, the man hadn't been aiming at William Johnson. He had been aiming at Gillian.

After breakfast the next morning, Sherlock explained everything. He did not need to, but, as he was brimming with pleasure that he was, as expected, right, we let him.

'I saw the poster two days ago,' Sherlock began. 'I liked the pieces. I'd heard of the CPO. But I was more intrigued by the graffiti.' He indicated the leaflet that he had unrolled the night before. 'Someone outside of the orchestra? Possible, but not likely. Orchestral feuds – that was new. I booked tickets. I probably overreacted. But I was interested. At the theatre, I noticed that there was a cellist missing: the others had spaced out as if they were filling a gap, and the one on the end had his own music-stand.'

At this point I had to explain to Gillian that this deviation was most likely out of his passion for deduction rather than a true suspicion.

'I checked your website; I was correct. I didn't dwell on it as the concert had begun. But as soon as the first shot was fired – that wasn't meant to hit William Johnson. It wasn't anywhere near. But, as I've said, it was a fortunately rotten shot.

'Everyone – or almost everyone – looked at where the bullet went. William Johnson didn't: he had seen something. The gunman, hiding in the wings. He had recognised him. He had to be got rid of. An impulsive decision. Our – protagonist did not miss this time.

'I went after the gunman, but I lost track of him. Two possibilities: he would return to the theatre, or go to your hotel. I came back to find out which hotel; I made sure that the police would keep guard at the theatre. Then I made sure that he wouldn't find you.' His stare fixed itself on Gillian.

'Thank you,' she whispered into the uncertain silence.

His mouth twitched. 'So I questioned you. I got the information I needed. I phoned the police; they got Marcus Thompson at exactly the right moment.'

He drew a breath; he had a habit of talking non-stop at seventy miles an hour. 'Perhaps he did not mean to kill you; I think he meant only to injure you. He wanted revenge. And to disrupt the concert. In that respect he succeeded.'

Gillian stared into her reflexion in the coffee-table. She had gone very pale. 'Revenge? Injure me? Why?'

Sherlock merely tapped the poster. 'Jealousy.'

She did not say anything, but her eyes suddenly swooped downwards. She knew what Sherlock was talking about. Perhaps she realised the price of fame: that she was not entirely innocent, that her name was plastered across the nation whilst the orchestra remained in shadow. Perhaps she could think of some other incident or something said that she did not want to reveal.

Finally she stood. 'It seems I must thank you, gentlemen,' she said quietly. 'The matter is solved: it should perhaps have been solved much sooner. It is a thing that has most likely been brimming for a while. And now – I think we can learn that a man with a gun acts before he thinks. As, perhaps, do I.'

She paused. 'We were going to do Elgar's Cello Concerto,' she reflected with a wry smile. 'But it wasn't summery enough.'

She went over and got her jacket. The case was closed.

'Thank you,' she said once again; and, very daintily, she curtseyed and left.