A drug dealer told a murder trial jury he feared he was going to die when his supplier beat him up after he lost the drugs he was keeping for him.

Nicholas Hickson told how Philip Smith repeatedly hit his kneecaps with a baseball bat and picked up a gas bottle canister to smash over his head after the haul of thousands of pounds of ecstasy, speed, and cannabis went missing.

Hickson, who is accused of murdering Smith in a lay-by shooting at Tong, spent 14 days in hospital where he underwent an operation to repair a smashed kneecap.

Hickson, 32, told the jury at Leeds Crown Court that Smith visited him each day in hospital and threatened to kill him and burn his house down with his mother inside if he went to the police.

He told the trial he had agreed to keep drugs for Smith because he felt frightened to death by him.

The jury heard the kneecapping took place in February 1999, three years before Hickson shot Smith dead after meeting him over a £17,000 drugs debt he owed him.

Hickson had started to keep drugs for Smith at his house.

He told the jury: "I felt obliged to do it. He intimidated me.

"I didn't want to get on the wrong side of him."

But he became afraid of the police raiding his home in Royds Avenue, Birkenshaw, and started to hide the drugs in a hole under a tree. But the drugs, worth £8,500, vanished and he invited Smith to his house to tell him.

Hickson said he apologised and told Smith he would get the money for him.

But Smith drove him to the house of an accomplice, Richard Wood. The pair bundled him into the garage and began to beat him up.

Then Wood fetched a baseball bat and lifted Hickson up and Smith repeatedly hit him on the legs with the bat.

Hickson told the court: "The blows were landing on my kneecap. I was in agony. I thought they were going to kill me."

He said Smith picked up the gas heater bottle and was going to hit him over the head with it until Wood stopped him.

The pair then drove Hickson back to his house and took £1,000 he was keeping in a cupboard.

Hickson made his way to his grandmother's house and was taken to Dewsbury Hospital. He had suffered a fractured knee and other injuries.

The court has heard how Hickson twice shot Smith in February last year in a lay-by in Tong Lane, Tong Village.

He had met Smith because he owed him £17,000. He did not have the full amount and told police he took a gun for his own protection.

Prosecutor Franz Muller QC said the gun had been fired three times, twice hitting Smith in the head and neck. He claimed it was out of revenge.

But Hickson told police he had not intended to kill Smith, claiming the gun went off accidentally.

Hickson, a plumber and heating engineer, denies murdering Smith, 29.

The trial continues.