AS JACK McConnell strode into the 58-storey Trump Tower on New York's Fifth Avenue last October, he would have been forgiven for thinking how well things were going. Awaiting him was the building's billionaire owner, who had some good news in store.
Donald Trump wanted to build a new golf course in Scotland: a spectacular multi-million pound development on a pristine stretch of Aberdeenshire beach. McConnell and Trump enjoyed a lunch of shrimps and steak. Along with a photo opportunity, at which Trump made favourable noises about investing in Scotland, it completed a satisfactory few hours for the First Minister.
Today, however, that meeting has come back to haunt him.
There is hard evidence of a clear conflict of interest, and McConnell stands accused of breaching the ministerial code of conduct, the rule-book which lays down how ministers should behave.
McConnell's private office will now be required to investigate his dealings, following a complaint by the Green Party.
That complaint is based on a dossier of government e-mails, minutes and correspondence between officials and Trump's advisers, obtained by Scotland on Sunday, which reveals the full extent of how the office of the First Minister was put at the disposal of one of America's richest and most controversial men.
Menie Links, a five-mile-long coastal dune system in the north-east of Scotland, has lain untouched for centuries, a rare unspoilt stretch of beach which is home to nesting waterfowl, wild geese and songbirds. It was upon this unlikely spot that, last summer, the gaze of the Donald Trump empire settled. The 800 acres had been bought up by American businessman Tom Griffin, who was now open to selling. Trump, who owns championship-standard courses in America, was immediately attracted.
Under Freedom of Information legislation, Scotland on Sunday has obtained documents from Scottish Enterprise (SE) revealing the government's close working relationship with Trump.
The billionaire's golf company was lavished with attention. Two memos released by SE show that - at a cost of 4,800 to the public purse - the agency paid for two helicopter tours of Scotland, taking in the golf course site, as they showed off the country to their deep-pocketed American friends.
A further e-mail shows they offered to meet the 40,000-50,000 cost of a feasibility study into the Menie Links site. Trump's people were impressed, "raving" in August last year about the way enterprise agency officials were courting them. All was set fair for a deal.
On September 23 last year, Lorna Jack, American director of Scottish Development International (SDI), an arm of SE, met Trump to discuss what had been termed Project X. "Mr Trump expressed an interest in meeting with the First Minister...to discuss how this project could be brought forward," she wrote in an e-mail back to Scotland. "Could you please ask the minister's team if they would view this as a favourable meeting."
SE's courting of Trump was one thing, but for McConnell to get involved personally was another matter.
The ministerial code of conduct is clear: ministers must not do anything which "might be seen as prejudicial" to the planning process, including "meeting the developer or objectors to discuss the proposal, but not meeting all parties with an interest in the decision".
The meeting with Trump was arranged nonetheless. SDI informed Trump that McConnell was "very excited" about his vision for this project.
On October 14, Lorna Jack
told Ashley Cooper, Trump's golfing director, "[The meeting] will provide both Scotland and the Trump organisation with some public profile that can be tapped into ... in the crucial months ahead and will give you a direct line into the government in Scotland."
The inference is that the meeting would ensure Trump could bank on government support over the coming week, even though government is supposed to remain impartial.
Just as remarkably, the e-mail went on to suggest McConnell's team of spin doctors should be put at Trump's disposal. "I suggest I link the First Minister's head of public relations up directly with the Trump organisation's equivalent."
The documents also reveal that by the time McConnell made it to visit Trump, on October 25, the plans were already sown up. On October 19, Trump's managers told SDI that they "had a deal".
Faced with claims recently that McConnell overstepped the mark by discussing the golf course plans at that meeting, his aides have insisted he "did not go into the details" with Trump. But the official agenda for his meeting with Trump shows that it was organised specifically to do just that.
The objective was "to discuss Mr Trump's proposal for entry into the UK golf resort market via a project in Aberdeenshire he has been working on with SDI". This was to stay strictly private. Officials decided that the "news line" would simply be that the pair had met to "discuss Trump's interest in and connection with Scotland [his mother is from Stornoway]".
McConnell's support for the project had clearly been offered, the documents show. In an another SDI e-mail, sent the day after the meeting, Lorna Jack told Ashley Cooper at the Trump organisation: "I hope you were reassured at the highest level possible through both Jack McConnell, Scotland's First Minister, and Jack Perry, our CEO's involvement in today's meeting, that we are committed to the partnership that will deliver this project."
Yet back in Scotland after the trip, officials sought to cover up the extent of McConnell's involvement.
After an article appeared in the local press in January about Trump's plans - and McConnell's support - the First Minister's chief press officer, Susan Dalgety, briefed colleagues on what line to take. "The journalist has paraphrased our response very badly, to wrongly suggest there has been further conversations between Trump and FM since they met in NY. Which of course is not true, and that FM is not aware of any firm plans," she declared.
She went on: " If asked if First Minister is aware of Mr Trump's plans, we should repeat that the Scottish government is aware of a number of potential investors at any one time, but will not discuss/disclose details."
It was clear that officials were aware of the potential problems they faced.
"It would be inappropriate for ministers to attend any launch of the development proposals," Dalgety wrote again. "Even if they stuck to the above lines, their mere presence at such an occasion could lead to their impartiality being questioned."
Despite this, McConnell himself still wanted to keep his face close to Trump. Before going to New York in April to attend Tartan Week, McConnell's private office requested that the pair be seen to meet up. "He [McConnell] would like consideration to be given to setting up a photo shoot with FM and Trump in NYC during Tartan Week," an e-mail reveals.
Last month, Scotland on Sunday revealed concerns that McConnell had breached the ministerial code of conduct in his dealings with Trump.
McConnell dismissed the story as "ridiculous". "If anybody thinks that I would be daft enough to discuss the details of a planning application with an international investor in advance of its consideration by the appropriate authorities, they are living in cloud-cuckoo land," he said.
But the documents revealed here today prove that McConnell did meet Trump to discuss the details of his plans for the golf course. He was, according to SDI's American chief, "committed to the partnership that will deliver this project".
Trump, meanwhile, could be reassured that such a link would give him "a direct line into the government".
Back in October, the trip to Trump Towers must have seemed to be a great piece of public relations.
Now, however, McConnell faces the prospect of a full investigation, while the future of a multi-million pound development hangs in the balance.