A bid by protesters for a judicial review of the approval of a wind farm in the Borders has been rejected.
At the Court of Session, Judge Lord McEwan ruled out the possibility of overturning permission for the 48-turbine Fallago Rig development.
Opponents claimed a second hearing looking at the scheme had been biased and the case had been "pre-determined".
Lord McEwan found no evidence that was the case and said protesters had played an active part in the inquiry.
A Scottish government reporter came down against the North British Windpower scheme at a first hearing in February 2008.
A key objection came from the Ministry of Defence with concerns it could interfere with radar defences and leave Torness nuclear power station vulnerable to surprise attack.
The inquiry was reopened under the same reporter in November 2009.
By the time of the second hearing, the MoD had dropped its objections after talks with government officials, and approval was finally given in November last year.
Opponents to the project insisted that there was no "new evidence" to reopen the inquiry, as Scottish ministers had claimed.
Protesters said ministers had made up their minds to do everything in their power to bring about approval for the plans accusing civil servants of "covert conversations" to get the MoD to drop their opposition.
Scottish ministers had been "seduced" by the developer, it was alleged, at meetings with First Minister Alex Salmond and Finance Secretary John Swinney.
However, Lord McEwan was also told by lawyers acting for the ministers and the developer that the protesters had not challenged the second hearing but had taken an active part in it.
The judge said he was unable to find any conduct by the responsible minister which could be criticised.
The issue had been raised at Holyrood eight times between April and November 2009 and none of the answers to questions betrayed "a closed mind".
The judge threw out the demand for a judicial review saying those opposed to the wind farm were aware of all the issues to be raised at the second inquiry - which they appeared to have wanted.
That was the proper time to have asked for a judicial review, said Lord McEwan, when the expense of a new inquiry might have been saved.