A man was tied up naked in a shed for two days and told to eat dog food after fleeing from a family who kept slaves, a court has heard.

John Anderson said his alleged ordeal also had him screaming for his life after a young boy was ordered to light his petrol-soaked body.

Jurors heard claims the 43-year-old had earlier escaped from James McPhee and left Scotland for Oxfordshire.

It is alleged he was found and returned north where he was assaulted and "taught a lesson" by McPhee's father Robert.

Mr Anderson said he was later dumped in the metal shed, where children also apparently came in and urinated on him.

The High Court in Glasgow heard Mr Anderson's evidence on the fourth day of the trial of James McPhee, 45; Robert McPhee, 65; Steven McPhee, 37, and John Miller, 38, who are accused of slavery and violent behaviour.

Mr Anderson said he had been homeless in 1998 when he was offered labouring work by James McPhee.

He told the court McPhee could be violent towards him "whenever he was unhappy".

Mr Anderson said he attempted to escape on a number of occasions but was recaptured each time and subjected to violent beatings.

On one occasion, he said he was found in England and driven back north to McPhee's home in Larkhall, South Lanarkshire.

Mr Anderson said he was taken into his house and Robert McPhee, nicknamed the Tank Commander, was also inside.

The witness stated: "James told me that it was time to meet his dad. I knew what he meant. I was to get a beating."

Mr Anderson said he was to be "taught a lesson" not to run away again.

Prosecutor Kath Harper asked: "How strong was Bobby?"

He replied: "A very, very strong man. He is a tank. I thought I was going to die. "

The court heard it was after this that the witness was put in a metal shed alongside a sleeping dog without food or water.

He remembered it being winter but despite the cold he said he was forced to strip before being tied up.

The court heard James McPhee came the next morning with a young child.

Mr Anderson told jurors: "James asked was I hungry. He said that if I was hungry enough, I could eat the dog food. I did not get any water. He said: 'drink my p**s."

The trial heard Mr Anderson also had petrol poured over him from "head to toe".

The witness said: "He told the boy to light the lighter and burn me. The boy lit it and came towards me. I was hysterical. I thought he was going to set fire to me.

"I pleaded 'don't do it'. I said: 'I won't do it again. I have learned my lesson'."

McPhee and the child then left without lighting the fuel.

Ms Harper asked: "What were you feeling at that stage?"

The witness replied: "I wished he had lit it."

Mr Anderson also recalled two children coming to the shed and urinating on him before he was finally released two days later.

The four accused face a total of 30 charges, spanning 24 years between 1992 and 2016, including slavery and violence.

All four deny the charges and the trial, before Lady Stacey, continues.