A Royal Navy sailor has been found guilty after threatening a superior officer with a rifle on board a warship.

Leading Seaman (Above Water Warfare) Kevin Moffat, 45, had denied unlawful possession of a firearm.

But he was today convicted of the charge by a five-strong panel at Portsmouth Naval Base court martial centre, a Royal Navy spokesman said. Sentencing will take place at a later date.

Wing Commander Andrew McKendrick, prosecuting, told the court martial that Moffat had been drafted at short notice to serve on board the now-decommissioned Type 42 destroyer HMS Edinburgh in the summer of last year.

But the rating, originally from Edinburgh, had become worried because his partner was pregnant and due to give birth in January this year, the court heard.

Moffat had previously missed the birth of a child with a previous partner five years earlier because he was unable to return while on service, the court was told.

Mr McKendrick said that on September 28, when HMS Edinburgh was alongside in Lisbon, Portugal, on its way to the Falkland Islands, Moffat took an SA80 service rifle and three rounds of ammunition from a weapons store and went to the cabin of executive officer Lieutenant Commander Robert Williams, who was having a meeting with Lieutenant Sadie Gardner.

The court was told that as Moffat appeared at the doorway with the rifle in his right hand and ammunition clenched in his left, he told Lt Cdr Williams: "Sir, you know me, this is a loaded weapon and it's cocked. I want to talk to you."

Lt Cdr Williams then asked if Lt Gardner could leave and Moffat agreed.

He then asked him to hand over the rifle to another rating who was just outside the cabin, which Moffat did.

Lt Cdr Williams said: "I asked him "What's going on, what have you done?'.

"He explained that he still hadn't confirmed he could get away on January 13 for the birth of his kid and he'd had a tough phone call with his missus the previous evening and the pressure was on."

Matthew Farmer, defending, said that the incident had similarities to a shooting on the submarine HMS Astute.

On April 8 2011, Able Seaman Ryan Donovan shot dead Lt Cdr Ian Molyneux and also injured Lt Cdr Christopher Hodge during the incident on board HMS Astute while on a visit to Southampton, Hampshire.

Lt Gardner told the court martial: "Initially I thought it was an exercise, then I realised it wasn't because of his demeanour."

She added: "When he told me he had a loaded rifle and it was cocked, I thought I was going to get shot."

She also said: "I will never forget those words 'It's loaded'."

The court martial heard that Moffat had served in the navy for 25 years and had been a trained armourer since 1991.

He claimed he had removed the rifle and the three ammunition rounds, which were rusty, from the store to clean them.

He denied threatening Lt Cdr Williams and claimed he told him: "Sir, you know me, this is not a loaded weapon, I want to talk to you."