A 24-year-old woman who was allegedly murdered was trying to make a fresh start just a month earlier, a trial at the High Court in Edinburgh has heard.
Robert Chalmers, 59, denies murdering Samantha Wright "by means unknown" and hiding her body in a garden bin.
Prosecutors claim he murdered her at a house in Magdalene Drive in Duddingston on 12 or 13 June 2008.
Mr Chalmers blames another man, Vasile Ungureanu, for the death of Miss Wright, originally from Stevenage.
A man she met in Edinburgh's Princes Street Gardens, David Kane, 28, told the court she had said she was hoping for a fresh start back in England.
Mr Kane, a recovering heroin addict who has been clean for three years, said he was drinking in Princes Street Gardens on "a roasting hot day" in May 2008 when Samantha, carrying a bottle of cider, began chatting, then invited him back to her flat.
They sat drinking in the darkness, because there was no power in the flat in Stevenson Drive, Edinburgh, Mr Kane said. They then fell asleep in the same bed.
The next day they went to Mr Kane's mother's home in the Drylaw area of the city and begged for a can of super lager.
The couple also drank two bottles of stolen wine, he said, sitting on a patch of grass before going to Waverley train station.
He said: "The idea was to go from there to the train station. She was hoping for a fresh start back in England."
Mr Kane said he knew Ms Wright had no money.
He said: "She told me she was going to sneak into the toilet on the train or something. I don't think she actually had a ticket.
"I gave her my jacket to keep, as well, because she said she was cold."
Advocate depute John Scullion asked whether Samantha appeared to be concerned that she was inviting a complete stranger back to her flat.
"No, she was just a talkative girl," Mr Kane told him.
The trial heard that Samantha was stopped by British Transport Police and only got to Stevenage because her father Jeremy Wright paid her fare and a fine.
After visiting her parents, Ms Wright returned to Edinburgh on 10 May 2008.
Months later, after Ms Wright's parents had reported her disappearance, Mr Kane went to the police after recognising her face on a missing person poster.
The trial before judge Lord Malcolm, which started on Tuesday, is expected to last about seven weeks.