A mum has told a jury how she woke in the early hours of the morning to find a man standing over her bed threatening to rape and kill her.

The woman, who can't be named for legal reasons, told Swindon Crown Court Michael Unwin had got in through a window at her ground floor flat.

After making the chilling threats she said he dragged her through to the living area of the property where he raped her while her toddler slept in a nearby room.

She said he then took her mobile phone and used it to send a text message to his handset suggesting she had asked him to come round for sex.

Unwin, 49, of Oak Road, Chippenham, has pleaded not guilty to rape and threats to kill.

The jury of seven men and five women were played a police interview of the woman, who is in her early 40s, which was video recorded.

In it she sobs as she recalls how she says she woke in her Chippenham flat at 4.45am on Thursday December 6, 2012, to find Unwin, who she knew, standing over her.

She said he was wearing dark clothing and two sets of gloves, latex ones under a pair which were thicker and made of brown leather.

"He was standing there and he said he was going to rape me and kill me: 'I am here to rape and kill you,' he said," she told officers.

"He put his hand over my mouth and one over my throat. He took me into the front room against the side of the settee and he raped he. He pulled my pyjamas down and then he did it."

Asked how long the rape took she said: "It felt like for ever but it probably wasn't very long, I don't know."

During the incident she said she told him she would do whatever he wanted as she feared he would kill her.

"I thought once he had done this he would kill me," she told the police.

Later she said she found a text message sent to him from her mobile at 5.20am which said words along the lines of asking him to come round and have sex with her.

She said she had not sent the message and he must have done it when he picked up her phone after raping her.

Having been in her flat for about an hour she said he left, but as the window in her spare room was still open she feared he may return.

She said she waited for about half an hour before calling for help as she feared he may still be outside, hear her on the phone, and would kill her before anyone arrived.

Unwin denies all the charges and the trial continues.