A 29-year-old soldier has been sentenced to three years in jail after pleading guilty to possession of an improvised explosive device, a firearm and 87 rounds of 12-gauge shotgun cartridges.

Private Mark Cassidy, who is originally from Derry, admitted having the items at Grianan Vale Apartments, Ballyderowen, Burnfoot Co Donegal on 17 February.

He was serving at Finner Camp in Donegal at the time of the offence.

Letterkenny Circuit was told that after having had a perfect record in the Army at home and overseas, Cassidy will now get a dishonourable discharge.

Det Sergeant Michael Carroll told the court that gardaí received confidential information that there was a pipe bomb and ammunition in an apartment over a shop and garage in Burnfoot. They obtained warrants to search the premises after initial surveillance.

They found a fully viable pipe bomb in a cupboard at the top of the stairs and the building, including a shop, garage and apartments, was evacuated.

An Army bomb disposal team made the device safe and the following day gardaí continued their search and found 87 shotgun cartridges in the attic of the apartment occupied by Cassidy.

He was arrested and has been in custody since.

Det Sgt Carroll said gardaí also found a box in the flat containing two sets of overalls, balaclavas, gloves and a can containing petrol, but Cassidy did not admit that there was anything sinister in this.

Cassidy's barrister, Peter Nolan, put it to Det Sgt Carroll that his client had no subversive connections and the detective said he did not know why Cassidy got involved.

Mr Nolan said his client had been on service in Chad and had been administered the anti-malarial drug Lariam and there is a case before the courts in which it is claimed a soldier had a total change of personality after being administered the drug.

Mr Nolan said that Cassidy had been in Chad in 2010 and his aberrant behaviour began in 2011, in line with a lot of soldiers who had been given this drug.

He said that Cassidy's brother had taken his own life in 2009 and his mother had died in 2011 and both their deaths had had a great effect on him.

He said his client suffered from depression and referred to army medical reports that said he was suffering episodes of tearfulness, palpitations and poor sleep quality.

One report said that he blamed his work situation and felt he was being pushed out of the army.

Mr Nolan said Cassidy's anxiety attacks and ongoing psychiatric difficulties stem possibly from taking Lariam and his life experiences.

He said he is finished in the army and had a perfect record and it is mysterious that it should come to this.

Mr Nolan said that why he was holding the ammunition and pipe bomb and for whom he was holding them is a mystery.

Imposing sentence, Judge Matthew Deery said there is no evidence to link any medication with Cassidy's actions.

He said Cassidy’s army career appears to be at an end and the charges are serious.

The reasons why the items were stored close to the border in a premises used as a supermarket and a garage selling petrol and diesel, are not explained, the judge said.

He sentenced Cassidy to three years in jail on both charges, the sentences to run concurrently and from the date he was first arrested.