AN armed man swung a sword at a police officer’s face in Greenock Cemetery — then claimed he only had the weapon because of a £5,000 ‘hit’ threat on his life.

Jordan Cunningham reached behind his back to produce the sword following a foot chase through a number of streets.

Despite Cunningham’s attempt to strike him with the foot-and-a-half long blade, the brave officer landed a blow on him with his baton before the pursuit resumed.

Greenock Sheriff Court heard how Cunningham, 23 — who had a knife tucked into his waistband — was later found in a back garden on the town’s Old Inverkip Road, reports the Greenock Telegraph.

The incident began after officers in a patrol car saw a man acting suspiciously.

Prosecutor Joanne Gilmour said: “As the police entered Skye Street they saw the accused with a large knife in his hand as he ran down the street.

“Officers pursued the accused on foot and various vehicles had to take evasive action to avoid both him and the police.

“The accused ran into the cemetery, still being pursued.

“He stopped at a large bin and police believed that he was about to comply.

“However, he put his right hand over his shoulder and produced a silver-coloured sword with an approximate 18-inch blade.

“Police sought urgent assistance and they created a safety action gap between themselves and the accused.

“The accused swung the sword, narrowly missing the face of one officer.”

The court heard how the officer drew his baton and struck Cunningham once to the body.

Cunningham — who had earlier been seen with the knife in a shop on Inverkip Street — ran off and was pursued by the police while still in possession of the sword.

Fiscal depute Ms Gilmour said: “The accused stated to police that there was a £5,000 hit out on him and the knife and sword were for his own protection.”

The court heard that Cunningham later told officers: “I’d like to apologise for my behaviour earlier on.”

He pleaded guilty on indictment to having a knife and a sword and to assaulting a police officer by attempting to strike him with the sword.

The offences were committed on June 24 and Cunningham has been held in custody since then.

Sheriff David Hall deferred sentence for a background report and asked for the sword and knife to be in court for the next calling of the case on October 17.

Defence lawyer Ellen Macdonald reserved her plea in mitigation on behalf of Cunningham until then.