A student who was allegedly raped in a city park has told a court how she fought for her life after a man pounced on her from behind.

The undergraduate told a jury on Tuesday that she was returning home from a night out when she was attacked in the Meadows in Edinburgh on November 15, 2014.

The 20-year-old woman told the city's high court that she fell unconscious after her attacker started choking her.

The female, who cannot be named for legal reasons, said that when she regained consciousness, she was lying on the ground. The court heard that her attacker was on top of her and the woman said he raped her.

The woman was giving evidence on the second day of proceedings against 23-year-old Steven Davidson.

Davidson, of Newtongrange, Midlothian, denies raping the woman and also denies a second charge of being involved in supplying drugs at various locations in Edinburgh in November 2014.

On Tuesday, the woman told prosecution lawyer Jane Farquharson that she was walking through the Meadows shortly before 7am. She had spent the previous evening with friends at parties and at a nightclub in Edinburgh.

The woman told the court that she heard footsteps behind her and thought it was a friend who was coming up behind her.

She said: "I thought it was just a friend who was approaching me. He was running straight behind me. He was grabbing me by the neck with his arm. I couldn't get any breath. At that point, I realised it was an attack."

The woman also told the court that the alleged attack has had consequences on her life. She told Ms Farquharson: "I still get scared when I hear somebody running behind me."

Prosecutors allege that on November 15 2014, in the Meadows public park, Davidson approached the woman from behind and placed his arm around her neck.

The Crown claims that he caused her to lose consciousness and to fall to the ground before raping her.

Prosecutors also claim that on November 14 2014, at Nicolson Street and London Road, Edinburgh, Mr Davidson was concerned in supplying cannabis. Davidson has pleaded not guilty to the charges.

The trial, before judge Lady Stacey, continues on Wednesday.