A GP has told a jury that an alleged rapist told her he was dangerous and needed stopping.

Dr Miriam Hodgson claimed that during a routine consultation over some cardiac readings, heart patient John Kevin O’Neil had told her he had raped a woman and had had sadomasochistic sex.

She alleged he said he was seeking out ever more extreme sex and was trying to make gangs of men kill him.

She recorded in her notes: “patient feels he is dangerous and feels he needs to be stopped.”

She said she referred him urgently to mental-health specialists and the surgery barred him from seeing its women doctors.

The prosecution at York Crown Court alleges that O’Neil, 44, of no fixed address, raped a woman on July 19 some weeks after he saw the doctor. He denies the charge.

A friend of the woman alleged that when she came to a pre-arranged afternoon with her on July 20, the woman looked “very withdrawn, very quiet and very tired” and that from then on she was lacking in confidence.

“I thought it was due to her and her boyfriend breaking up,” said the friend.

The friend alleged during a party, probably in December 2013, O’Neil told her he knew a lady who “liked being raped” and would go round to her house and rape her.

She claimed she was shocked and said something about both being adults and no-one getting hurt.

“Then he replied: ‘Well, I didn’t say nobody wasn’t going to get hurt’. By that stage I didn’t want to carry on that conversation,” said the friend.

Dr Hodgson, of Monkgate Surgery, alleged she saw O’Neil at the end of the day on April 8.

As he was talking to her, she was typing what he was saying and trying to work out if he was telling the truth, if he was a risk to other people or himself, whether he was trying to intimidate her or getting enjoyment out of telling her.

The trial continues.