A Borders man has gone on trial accused of raping a sleeping woman in her home.
Mark Ormiston, 45, denied the charge and has lodged a special defence claiming the woman consented to sex.
He was also charged with behaving in a threatening and abusive manner at an address in Jedburgh between November 2013 and November 2014.
Mr Ormiston, whose address was given as Saughton Prison, appeared at the High Court in Livingston. The trial, before Lord Boyd, continues.