A man stabbed an off-duty police officer he once went to school with in a "frenzied" attack when the alleged victim opened his door, a court heard.

Prosecutors said John McCartney, 39, of launched a "targeted" assault on the Essex Police officer in Rayleigh, Essex, on Wednesday evening.

McCartney appeared at Southend Magistrates' Court on Friday charged with attempted murder and possession of a knife.

The court heard McCartney is believed to have known the Essex Police officer, who cannot be identified for legal reasons, from attending the same school.

The alleged victim was stabbed a total of 10 times, suffering six stab wounds to the centre of his chest, lacerations to his chest, arm and abdomen - exposing his bowel - a half-inch wound to the upper arm and wounds to the feet, it was heard.

Essex Police said he was now in a stable condition in hospital.

Blonde-haired McCartney was clean-shaven when he appeared in the dock, wearing a prison-issue red tracksuit and glasses.

He spoke to confirm his name, date of birth, address, national insurance number and that he was British before the charges were read out by the legal adviser. He was not asked to enter pleas.