Three teenagers have been charged with riot and remanded in custody in the wake of ongoing disorder in Ballymena, Co Antrim.
District Judge Nigel Broderick declared that "where there is credible and reliable evidence" against anyone arrested in the serious public disorder, there is a "high likelihood they will be refused bail" and will face a lengthy sentence if convicted.
Judge Broderick warned that anyone involving themselves in the ongoing "despicable" rioting "will be dealt with robustly".
The judge issued the warning at Ballymena Magistrates Court, where three teenagers appeared in the dock.
A 15-year-old and a 17-year-old who cannot be identified due to their ages, and 18-year-old Michael Elliott, from the Lanntara area of Ballymena, were all charged with riot on 10 June this year.
The 15-year-old was further charged with causing criminal damage to a wheelie bin.
A detective said police were seeking remands into custody because there is a need to "send out a strong message to deter others" after three consecutive nights of ongoing rioting.
He said police believe that if such a message is not sent out by the court, the ongoing disorder could "lead to serious injury or death to people in the area, namely foreign nationals".
The 17-year-old did not apply for bail but Mr Elliott and the 15-year-old did.
Despite defence submissions that each teenager could be freed on bail with conditions to keep them out of the town, Judge Broderick disagreed and refused to grant bail.
The 15 and 17-year-olds will appear in the Youth Court on 18 June, while Mr Elliott will appear again on 10 July.