A lawyer claims Scottish ministers have “misdirected themselves in law” amid an inquiry into the Scottish Government’s decision not to investigate Donald Trump’s finances in Scotland, a court has heard.

The US-based Avaaz Foundation petitioned Scotland’s highest court, the Court of Session, to grant a judicial review after ministers in Edinburgh declined to place an unexplained wealth order (UWO) – sometimes described as a “McMafia order” – on the former US president.

The order allows for an investigation into how a person or company earned money.

The judicial review, which began on Tuesday, heard there is a dispute over whose responsibility it is to apply to a court for a UWO, particularly between the Lord Advocate – the head of Scotland’s prosecution service – and Scottish ministers.

The Scottish Government refused calls for an investigation in February, with the then justice secretary, Humza Yousaf, saying such orders are an operational matter for the civil recovery unit – which comes under the responsibility of the Lord Advocate.

QC Aidan O’Neill, representing Avaaz, said Scottish ministers have failed to understand their role and responsibility in relation to applying for a UWO.

He described their interpretation of the role of the Lord Advocate in this case as “institutionalised schizophrenia” adding that “it makes no sense”.

Speaking at a virtual hearing on Tuesday, Mr O’Neill said the ministers have “misdirected themselves in law, in the correspondence which has gone back and forth between Avaaz and the Scottish ministers and in Parliament” in relation to who is responsible for applying for UWOs.

He went on to explain in detail the provisions of the Proceeds of Crime Act 2002 (Poca) to the court adding, “the problem is that at some level, Scottish ministers have misdirected themselves because they haven’t entirely understood the detail of the Poca provisions”.

Mr O’Neill said there is a clear distinction between what the Lord Advocate does, in terms of enforcement and investigation proceedings under Poca, and what the Scottish ministers do.

“It cannot be the Lord Advocate who is the responsible minister in terms of the seeking of UWOs, particularly against politically-exposed persons,” Mr O’Neill said, referencing the Act.

Lawyers for the Scottish Government had previously argued the petition had not been lodged within the three-month deadline from the original decision being taken, but in a previous judgment allowing the review to take place, Lord Sandison’s approval of having the review go ahead was “in the interests of justice”.

Ruth Crawford, representing the Scottish Ministers, is yet to speak in court.

The hearing continues.