A senior detective made “errors” but still uncovered enough evidence to charge a businessman suspected of committing crimes whilst rescuing Rangers, a court heard.

Advocate Alastair Duncan QC said Detective Chief Inspector Jim Robertson did not engage in an attempt to “fit up” David Grier, 57, during a probe into alleged illegality at the Glasgow side.

Mr Duncan told judge Lord Bannatyne at the Court of Session yesterday that the police acted lawfully during the investigation.

The silk told the court that DCI Robertson admitted to making mistakes in some aspects of the investigation.

Mr Duncan said the detective and his colleagues acted entirely under the direction of Crown Office prosecutors who were concerned that Mr Grier may have broken the law during the sale of Rangers in 2012.

He said that the police officer uncovered enough evidence to justify charging Mr Grier alongside David Whitehouse, Craig Whyte, Charles Green, Paul Clark and Imran Ahmed.

Mr Duncan told the court that DCI Robertson spent a long period of time believing that Mr Grier was innocent of any wrongdoing.

He said the policeman only changed his mind after uncovering enough evidence.

Mr Duncan added: “Mr Robertson was not trying to fit up Mr Grier. He spent a considerable period of time believing him to be innocent of any wrongdoing.”

Mr Duncan was speaking on the second day of a hearing at Scotland’s highest civil court.

Mr Grier, who works in helping to turn around failing businesses, is suing Police Scotland for £2 million. He claims that detectives acted unlawfully when he was arrested in 2014.

Officers suspected Mr Grier, of London, had broken the law during the sale of the Ibrox side and the businessman was charged with fraud and conspiracy.

But Mr Grier and his co-accused were later cleared of wrongdoing.

In this action, Mr Grier’s lawyer, Andrew Smith QC, is seeking a summary decree – this means an automatic reward of damages to his client as he claims the nature of the police’s actions mean they are unable to defend the action.

The court heard Mr Smith allege on Wednesday that the police “manipulated” the legal system in a bid to secure a conviction against Mr Grier and this would have resulted in a “miscarriage of justice.

Yesterday, Mr Duncan said that DCI Robertson made errors in reports which he wrote during the probe.

But Mr Duncan insisted there was not an attempt to manipulate the legal system.

Police Scotland are contesting the action and deny any wrongdoing.

Their lawyers claim that officers had a reasonable basis of suspecting Mr Grier of being responsible of illegality. The hearing continues.