Lawyers acting for US billionaire Donald Trump have challenged the legality of a decision to approve an offshore windfarm within view of his golf resort on the Aberdeenshire coast.

The cart was put before the horse in granting consent without a licence to generate electricity, his legal team argued at the Court of Session in Edinburgh.

The US property tycoon opposes the 11-turbine European Offshore Wind Deployment Centre (EOWDC), claiming it will spoil the view from his nearby golf course.

His case, argued by Gordon Steele QC, also calls into question whether the scheme's backer, Vattenfall Wind Power, would be a suitable licence-holder because it has suffered financial losses and pared back investment.

Addressing the way consent was granted, Mr Steele said: "It is obvious that what is to be favoured is one that puts the horse before the cart in the right order. Licences should be granted first. The purpose of this generation is to supply tens of thousands of homes.

"The logical and practical position is this: what is the purpose of looking at and formulating proposals if, at the end of the day, the applicant is not to be a suitable licence holder? That's in nobody's interests. The logical way forward is to have the person checked out to see if they're suitable or not."

Mr Steele drew attention to majority shareholder Vattenfall's announcement in May that it is paring back investment in the scheme and calling on potential investors to realise the £230 million cost. At the time the firm had invested around £5 million.

"What happens if the applicant is found not to be suitable? A brief examination of a forensic accounts report discloses that the applicant has made a loss in several financial years," he said.

Referring to the applicant as a shell company, he said: "This is not a company that has actually done anything."

The Trump Organisation's plans have been prejudiced by the process, Mr Steele argued.

"If this is not competent, that should be an end to the matter. The resolution is terribly simple. A new application, proceeded of course by a licence being applied for and being consented," he said.

Mr Trump's legal action is against the Scottish Government's approval of the windfarm, granted on March 26.

A petition lodged by Trump International Golf Links and the Trump Organisation earlier this year asks the court to declare that the decision was unlawful. It also challenges the decision not to hold a public inquiry into the project in Aberdeen Bay.

The hearing, known as a petition for judicial review, is expected to last four days.

Mr Trump has said he will pull the plug on his own controversial plans to finish his proposed luxury resort with a large hotel, holiday homes and a residential village if the windfarm goes ahead.

Senior members of Mr Trump's executive team, including his son, Donald Trump Jr, and George Sorial, were in court today.

The Scottish Government is expected to make its case later this week.

In a statement before the case began, a spokeswoman said: "The Scottish Government is committed to the successful and sustainable development of an offshore wind sector. It is not appropriate for the Scottish Government to comment on ongoing legal proceedings."