Mr David Trimble acted unlawfully when he banned two Sinn Fein ministers, Mr Martin McGuinness and Ms Bairbre de Brun, from cross-Border meetings, a judge ruled yesterday.
The First Minister has now to nominate representatives to meetings of the North-South Ministerial Council, but not necessarily the two Sinn Fein ministers, Mr Justice Kerr ruled in the High Court in Belfast.
He was giving reserved judgment in the application for judicial review brought by the two ministers and heard last month.
Mr Trimble refused to nominate the ministers to put pressure on Sinn Fein to influence the IRA to re-engage with the arms decommissioning body.
But his move led to Sinn Fein accusing him of discrimination and bowing to the dictates of the Ulster Unionist Council.
Mr Justice Kerr said Mr Trimble had stated that his refusal to nominate the two ministers was that he hoped to persuade Sinn Fein to exert pressure on the IRA to decommission its weapons.
"That stance does not betoken less favourable treatment of Sinn Fein on account of their political views; it represents an attempt to persuade them to follow a particular course."
Mr McGuinness was in court to hear the judgment read and told reporters he was very happy with it.
Mr Justice Kerr said it was not open to the First Minister to refuse to nominate a minister who was in every way suitable to attend the sectoral meeting simply because he wished to induce that minister, or the party to which he belonged, to act in a particular way.
"The First Minister's primary duty is to nominate ministers who will fulfil the necessary requirement of cross-community participation," he said.
But having done so, the First Minister enjoyed a discretion as to whom to nominate, and this would allow Mr Trimble to decide not to nominate a particular minister. In exercising his discretion it did not follow that Mr Trimble must nominate Mr McGuinness and Ms de Brun.
The judge added: "In order to promote the objective espoused by Mr Trimble [decommissioning] he has adopted a strategy that will at least inhibit, if not frustrate, another objective [North-South Council meetings]."
He referred to Section 52 of the Act, which requires the First Minister to nominate ministers in a way that would promote the full implementation of all aspects of the Good Friday agreement, including decommissioning of weapons.
"The decision to refuse to nominate Ms de Brun and Mr McGuinness is for a purpose collateral to the purpose of Section 52 and it cannot be rescued by recourse to a separate objective of the agreement that Mr Trimble hopes to secure," the judge said.
"It is well settled that a decision taken for a collateral purpose will be amenable to judicial review. The refusal of the First Minister to nominate Ms de Brun and Mr McGuinness must therefore be declared unlawful."