The High Court in Edinburgh heard David Gilroy was contacted in Argyll and returned to the capital to give a statement to police.
Mr Gilroy is accused of killing Ms Pilley either in Edinburgh or elsewhere in Scotland in May 2010.
He denies all the charges against him. Ms Pilley's body has never been found.
PC Grant said he had gone to her employers, IML, in Thistle Street and spoke to colleagues, who told him she had been in a relationship with Mr Gilroy.
He was given Mr Gilroy's mobile phone number and spoke to him after 17:00.
'Significant witness'
PC Grant said Mr Gilroy, who worked for the same firm, told him he was in Lochgilphead, where IML were involved in the construction of a building.
He also said he had last seen Ms Pilley on Monday 3 May, when he agreed to end his relationship with her.
The police officer told prosecution lawyer advocate depute Alex Prentice QC that he wanted to interview Mr Gilroy as soon as he returned to Edinburgh.
Mr Gilroy arrived at Corstorphine police station at 23:40 and was interviewed overnight. The statement given by Mr Gilroy ran to 59 pages.
Hotel 'row'
Earlier, the court heard about an argument between the accused and Ms Pilley in a hotel room the year before she disappeared.
Businessman Steven Kavagnah said the alleged argument with Mr Gilroy happened during a corporate function at Crieff Hydro in October 2009.
Mr Kavagnah told Mr Prentice that the confrontation took place as he was using the bathroom in Ms Pilley's room.
“Start Quote
The gist of it was that he thought I was intending to sleep with Suzanne”
End Quote Steven Kavagnah Witness
He said that after leaving the bathroom, Mr Gilroy asked him what he was doing in Suzanne's room.
The businessman said: "There were raised voices.
"The gist of it was that he thought I was intending to sleep with Suzanne. He was clearly unhappy. He was upset, angry."
Mr Gilroy denies murder and four other charges which allege he committed a series of criminal acts across Scotland between August 2009 to June 2010.
Mr Kavanagh said he came into contact with Ms Pilley at the function at Crieff Hydro and they had a number of conversations on the night.
He said Ms Pilley had told him that she had been in a relationship with Mr Gilroy but had broken up with him some time before the evening in question.
Door locked
Mr Kavanagh then told Mr Prentice that at the end of the evening Ms Pilley approached him and said the lock to her door was not working.
Mr Kavanagh said that he waited with the book keeper while hotel staff forced the door open.
He then said that he went to use the toilet in Ms Pilley's room as he was "desperate".
As he was using the bathroom, Mr Kavanagh said he could hear "raised voices" coming from the main room.
When he left the bathroom, Mr Kavanagh said he saw Mr Gilroy who was "clearly unhappy."
Mr Kavanagh added: "He said something like 'what are you doing in my girlfriend's room'. He wasn't happy. He was shouting."Mr Kavanagh then said Ms Pilley managed to calm Mr Gilroy down and the pair spoke to each other in the hotel's reception area.
After the chat, Mr Kavanagh said Ms Pilley appeared to be "okay."
http://www.bbc.co.uk/news/uk-scotland-edinburgh-east-fife-17209732
Cadaver dog's' indicated 'in the McCann case.
In the apartment behind the sofa , the parents wardrobe where it is thought the cadaver of Maddie was hidden by the parents. The mother's clothing, a small T- shirt belonging to Maddie, the trunk of the car hired 25 days after Maddie disappeared , the key fob , a piece of material found in another apartment they had later moved to And last but not least Madeleines soft toy Cuddle cat. Maddies body has never been found and her parents deny any wrong doing.
The same cadaver dog and handler used in the McCann case was also used in the murder case of Attracta Harron.