A former Northern Ireland MP's tweet threatened to collapse the rape trial of two Ireland rugby players just before the jury went out.

Proceedings were dramatically delayed and the court cleared as the remark by Naomi Long, leader of the Alliance Party and now an MLA, was discussed at Belfast Crown Court.

Launching a legal bid to have the jury discharged, Frank O'Donoghue QC, representing Stuart Olding, who was acquitted of rape, said the trial was on a "knife edge."

The lawyer said: "This is the straw that has broken the camel's back in this case."

The revelations are only being made public after reporting restrictions were lifted by Judge Patricia Smyth at Belfast Crown Court today.

Ireland and Ulster fly-half Paddy Jackson, 26, and team mate Stuart Olding, 25, were unanimously acquitted of rape by a jury which deliberated for three hours and 45 minutes having heard all the evidence in a nine-week trial.

Mr Jackson was also found not guilty of sexual assault.

Both men had strenuously denied all allegations against them. The court heard Ms Long had been critical of comments in Mr O'Donoghue's closing speech in which he described "middle class girls" who were in the house at the time of the alleged rape.

Ms Long posted on Twitter: "I genuinely have no words for how atrocious this statement is.

"Middle class girls?

"What? Because "working class girls" wouldn't care/don't matter/think rape is normal?

"What is the implication of that comment even meant to be?

"Appalling at every level."

The comment was re-tweeted 36 times and received 277 likes, the court was told.

It was posted at a crucial point in the marathon trial after all of the evidence had been heard and as Judge Patricia Smyth was issuing her legal direction to jurors on day 40 of the 42-day case.

Mr O'Donoghue argued the post risked prejudicing the administration of justice and had the capacity to reflect adversely on Mr Olding.

He said: "I was frankly aghast to find that Ms Naomi Long had taken it upon herself, notwithstanding that she has had no involvement in this case, has never attended the trial and has no obvious connection to this trial, to tweet an opinion to her followers about the appropriateness of my use of language during the course of my speech."

The lawyer further suggested that as leader of Northern Ireland's "third largest political party" Ms Long was someone of "extraordinary high profile" and influence.

He said: "However, given her profile as a leader of a mainstream political party, a Belfast MLA, the fact that she is a woman speaking about male attitudes to rape in the context of this trial means that there is a reasonable prospect that her views will have been received by one or more than one member of the jury.

"I do not know anything about the members of the jury. Further, in purely numerical terms, Alliance has approximately 10% of the vote in NI.

"It is the third largest party in Belfast. It is reasonable to assume, therefore, that at least one member of the jury may be inclined to vote Alliance or to see Naomi Long and her party as someone whose opinions carry weight and influence.

"In our view, the line has now been crossed.

"This Court has an obligation to ensure that an accused person receives a fair trial. The Court has done its utmost to discharge that obligation.

"The trial is on a knife edge. The jury is just about to go out to consider its verdicts. The timing of Ms Long's opinion on social media could not be more unfortunate, to put it mildly."

The lawyer called for the jury to be dismissed.

He said: "Unsurprisingly, Mr Olding has formed the view, as indeed has his legal team, that Ms Long's intervention is such as to create a substantial risk of prejudice.

"That this cannot be cured. And that, regrettably, this jury shall now have to be stood down and discharged.

"Regrettably, I am compelled to apply to the Court that this jury shall be discharged."

Meanwhile, prosecutor Toby Hedworth QC described the Twitter furore as a "storm in a teacup."

He said the defence barrister had chosen his words carefully and expressed confidence the jury would have heeded warnings to steer clear of social media.

After some consideration Judge Patricia Smyth rejected the application.

She said: "This jury has been repeatedly warned from the outset not to look at any press reports. They have also been told not to look at social media and in particular not to look at Twitter.

"It is recognised that jurors are capable of following instructions and I have no reason to think they have not followed every instruction nor do I have any reason to believe they have any knowledge of the tweet."

Judge Smyth added: "I am not satisfied that there is a real risk of prejudice to this jury and I refuse the application."

However an official request was made to have the tweet taken down.

Day 40 was to become one of the most dramatic days in courtroom number 12 of the Laganside complex.

A second application to have the jury discharged was made a short time later when Mr Jackson's defence team raised issues about the judge's pace, tone and delivery of her legal direction.

Brendan Kelly QC said he made the complaint with a "heavy heart" and "on instruction."

"I have to make the application," he said.

Rejecting the criticism, Judge Smyth said she had made changes to the wording of her direction at the request of legal teams and was being "scrupulously careful" to make the case.

She said: "I am studiously anxious to ensure that the points are made."

Two other men were also acquitted of lesser charges connected to the alleged incident in June 2016.

Blane McIlroy, 26, was found not guilty of exposure while Rory Harrison, 25, was acquitted of perverting the course of justice and withholding information.

Several media outlets took legal action to overturn reporting restrictions which prevented the publication of legal argument made in the absence of the jury.

Restrictions usually fall away when a case concludes because a jury can no longer be prejudiced.

The high-profile trial generated an unprecedented level of public attention.

In a statement outside the court, Mr Jackson's defence solicitor Joe McVeigh called for a crackdown on social media comment during criminal proceedings.

He said several days had been lost due to problems thrown up by the "intrusive infection of the process" by social media.

The case has also renewed the debate on whether defendants in rape trials should also be entitled to anonymity, with their names only being revealed if they are convicted.

Reporting restrictions in trial lifted with agreement of acquitted men

Reporting restrictions surrounding the rape trial were lifted after lawyers representing the four men involved in the high-profile case told a brief hearing at Belfast Crown Court they had no objections.

Judge Smyth said: "The only order that I need to make is that the prohibitions are now discharged. I make that order forthwith.

"The other prohibitions will fall away by statute."

A number of media outlets had challenged the reporting restrictions which barred publication of any legal argument or applications made in the absence of the jury.

Such restrictions usually fall away when a trial concludes because the risk of prejudicing a jury no longer exists.

But when the trial concluded two weeks ago Judge Smyth indicated they would remain in place.

Gerry Simpson QC, representing a number of print and broadcast news organisations, said: "Our application is that there is no longer any prohibition in reporting any matter which occurred in open court."

Frank O'Donoghue QC, representing Mr Olding said: "The defendants are all now in a position to consent to the application."

Solicitor Pat Kelly, representing Mr McIlroy, added: "We are not opposing."

Judge Smyth added: "Everyone is in agreement that the application should be lifted."

Meanwhile, restrictions preventing publication of the identity of a number of witnesses linked to the complainant remain in place at this stage.

Mr Simpson said he intended to take instruction on whether or not this would be challenged.

Judged ruled video of unconnected sex act would not be shown to jury

Jurors at the trial were not told about a pornographic video exchange hours after the alleged attack.

The clip showing a sex act was sent from Rory Harrison to Stuart Olding two hours after they ate lunch at a Belfast cafe on 28 June 2016.

But after legal argument Judge Smyth ruled the footage of two men and a woman, not connected to the case, having consensual group sex should not be shown to the court.

"At this stage the prejudicial effect of evidence outweighs the probative value," the judge said.

Details of the video can only be made public after reporting restrictions on the case were lifted.

The issue was raised about half way through the nine-week trial.

A defence barrister for Mr Jackson also cautioned if the clip was admitted his team may have to scour the internet for other clips of group sex.

Prosecutors had wanted the video to be included as evidence of a conspiracy to concoct a cover story in the event of a complaint being made by the woman at the centre of the case.

Mr Hedworth said: "The significance of this video is that it is sent by Mr Harrison to Mr Olding just over two hours after all four defendants have met up that lunchtime at Soul Food."

Later he added: "The video, we submit, provides evidence of what they had been discussing otherwise it is a remarkable coincidence.

"We submit this is highly relevant in respect of the overall case as it was being discussed by all four defendants as to what occurred earlier that same morning, and when one considers in particular Mr Olding's difficulty apparently knowing what Mr Jackson had been doing and Mr Harrison claiming not to know what had occurred upstairs.

"There are two sides as to how Mr Harrison was playing this game in the aftermath.

"It is important that the jury see what Mr Harrison was doing that morning.

"Was he being concerned genuinely, or was he enjoying with his friends what had gone on after their discussion about it at the Soul Food restaurant?

"It is highly relevant to this case as a whole but it is particularly relevant to Messrs Olding and Harrison."

Objections from defence legal teams included argument that the video could amount to prejudicial bad character evidence.

Mr O'Donoghue, representing Mr Olding, said there was "no evidence" his client had opened the video.

The lawyer added: "It was not a video of the actual events of the previous evening.

"The probative value of adding this material is negligible to the free standing prosecution case against Mr Olding."

Gavan Duffy QC, representing Mr Harrison, argued there was "no evidence" of any conspiracy and he suggested the prosecution was making an "outrageous speculative connection".

He asked: "What's the relevance?"

Meanwhile, Mr Kelly said the sole issue in the case was consent.

"Although I have not seen it, the fact that one co-defendant sent the other co-defendant not jointly charged, a video of consensual act is probative of what?"

After overnight consideration, the judge ruled the video should not be admitted because it may have an adverse effect on proceedings, was irrelevant and could be prejudicial.