A district judge has convicted an Antrim town man of stirring up hate by writing a racist message at a loyalist Eleventh Night bonfire in what is believed to be the first case of its kind in Northern Ireland.

Colin White, 19, of Farmhill in the Ballycraigy estate in Antrim, was found guilty of displaying written material which was threatening, abusive or insulting, intending thereby to stir up hatred or arouse fear, after he wrote a message on a divan bedstead at the Ballycraigy bonfire in the town on July 11, 2014.

White had contested the case but District Judge Alan White found him guilty at Antrim Magistrates Court on Tuesday.

He has asked for a pre-sentence report to be produced before he sentences White in January but said although the defendant had a previously clear criminal record he came close to sending straight to custody.

Judge White said the only thing stopping him from doing so was that White had learning difficulties.The court was told a man took photos of the Ballycraigy bonfire and noticed the divan with no writing on it but after three people approached it he could see that White was the only person whose arms were moving and afterwards there was graffiti which said: 'We're not racist, just don't like n----rs".

White did not deny being present at the bonfire but denied he had written the message.Judge White said that in this community "in the current climate" it seemed custody was appropriate for people stirring up racial hatred.

However, he said the only thing making him pause was the defendant's learning difficulties and without that he would have been going straight to jail.Judge White said White's was guilty of "pernicious conduct" and said in a society were there are almost weekly race attacks and people being put out of their homes and said such incidents can be "stirred up by this type of behaviour".

Opening the case, prosecutor David Russell said it was alleged White was the person who had written the words and several photos were supplied to the court by witness Peter Glover who said on the afternoon of July 11 he went to Ballycraigy because of publicity about the bonfire's size and height and took photos with his iPhone through the window of his car.

He said he went to Ballycraigy because it was supposed to be "a special one" and said he saw a person wearing a white tee-shirt, white shorts and orange-topped socks, later identified as White, write on the divan which had no writing on it moments earlier.

Mr Glover told the court: "I realised they had written a racist slogan and I was interested in taking a photo of the person who had done this". The witness later contacted police and made a complaint.

Defence barrister Aaron Thompson said White was interviewed by police and accepted being at the bonfire but denied spraying anything on the divan which he had just gone over to to see what was written on it but Mr Glover said: "I saw him performing the action of writing. I saw the divan was clear before and he was there and it certainly had writing on it immediately after his departure."

Mr Thompson said he was suggesting Mr Glover made a mistake and there were a number of people in the area who could have done the writing but the witness denied that.

Former Sinn Fein councillor Noel Maguire told the court he contacted police about displays on the bonfire which he saw on Facebook.David Russell said there was a tricolour on the bonfire featuring a smiley face and the words 'Keep Antrim Tidy. KAT" which Mr Maguire said he took to mean 'Kill all T--gs'.

The bonfire also contained Irish tricolours daubed with messages and a gallows with an effigy of Sinn Fein leader Gerry Adams attached. The court heard after police put out an appeal and his photograph was in circulation, White went to police to say he was in the picture but denied writing the words.

Aaron Thompson said there was no evidence to link White to anything else on the bonfire.Taking to the stand, White said he helped build the bonfire as he lived nearby and said he saw police were looking for the person in a photo and realised it was him and said he didn't know anybody else in the photos.

He told the court he just went up to the divan to read the message, saying: "I was just standing there, I couldn't really see it away back."Summing up, Mr Russell said it was clear the words written had been threatening and abusive and likely to stir up hatred particularly as they were set in the context of other material on the bonfire.

Aaron Thompson said his client's case was: "I did not do this".Judge White said he believed Mr Glover's evidence was "honest and accurate" and he said he had no doubt the defendant had written the words on the divan.

Convicting the defendant, the judge said he didn't believe "a word" of the defendant who came to court to say he didn't do it and also didn't know anybody around him.