The former SAS sniper Danny Nightingale faces possible imprisonment and discharge from the army after being convicted for a second time of illegally possessing a pistol and ammunition.

Nightingale was freed from military detention and had his original conviction quashed earlier this year following a high-profile campaign but a court martial board on Wednesday took less than five hours to find him guilty of the two charges.

His sentence was adjourned and Nightingale immediately suggested he might appeal against his conviction, comparing his battle with the military authorities to the fight between David and Goliath.

The soldier, who served with distinction in Iraq and Afghanistan, said his family was close to "financial ruin" because of the case but insisted he did not regret contesting the allegations even if he ended up behind bars. "If I didn't have such a strong family we'd be broken. But I never regret fighting it, not for one second."

He refused to comment on whether he believed the military authorities had pursued him because they had been embarrassed by the Nightingale campaign or whether he felt he was being made a scapegoat by army chiefs, who are believed to want to rein in the SAS.

Nightingale, 38, said he was still proud of his career in the SAS, which he joined in 2001, adding: "This won't taint my military memory. The last few years aren't really part of my military."

He will spend the next few days at home in Cheshire with his wife, Sally, and their two young daughters as he considers his next move. "We're going home. It's been a long 22 months and I don't know how long it's going to go on for. We're going to go home and have a cup of tea," he said.

Mrs Nightingale added: "Continue to support us because he's not guilty and he's not a criminal. He never brought a weapon into the country; he never had a weapon in his possession. We know the truth, the family knows the truth, we know most of the public knows the truth."

The court martial at Bulford camp in Wiltshire heard that a Glock 9mm pistol and more than 300 rounds of ammunition were found in Nightingale's bedroom in a house he shared with a friend and SAS colleague, who can be identified only as Soldier N.

Following the discovery, Nightingale and N were brought back to the UK from Afghanistan, where they were serving. Nightingale told civilian police the pistol had been a present from Iraqis he had worked with in 2007. He said he had carelessly stockpiled the ammunition while he worked as a range instructor for the SAS.

At his first court martial last year Nightingale said that he could not actually remember being given the pistol or collecting the ammunition, explaining that he had suffered memory loss following a serious illness in 2009 during an endurance challenge in the Amazon.

But when it was suggested by the court that he could face five years in prison if he fought the charges, he pleaded guilty. He was shocked to be given 18 months in military detention rather than the suspended sentence he was expecting.

A campaign to free him was launched by his family and some tabloid newspapers and led to a meeting between Mrs Nightingale and David Cameron, the prime minister. The sentence was reduced and eventually quashed because of the pressure Nightingale was put under to plead guilty. However, the military prosecutors decided to order a fresh court martial even though Nightingale is due to be medically discharged early next year because of his mental problems.

His housemate N had already pleaded guilty last year to possessing a pistol and ammunition that were found in his room in the shared house and was sentenced to two years' detention. Like all the special services soldiers who gave evidence during the court martial he was given anonymity. During the seven-day court martial, tantalising glimpses of life in the SAS emerged. The court heard how in 2010 Nightingale was made sniper co-ordinator of a fast-reaction counter-terrorism team ready to be airborne within 30 minutes to tackle a Mumbai-style terrorist attack on British soil.

At the time he and N lived a double life in an ordinary house in a suburban street, the location of which cannot be revealed for security reasons. Nightingale had the back bedroom, N the front. They took turns to mow the lawn and clean the windows. All the time they were ready to be helicoptered into a life-or-death situation.

But the prosecution made it clear there were no special exemptions for the SAS when it came to possession of weaponry or ammunition. "No soldier, no matter what his experience or what unit he is attached to is above the law," prosecutor Timothy Cray told the court.

Nightingale claimed the pistol and ammunition must have belonged to Soldier N. His "confession" about how he came by the gun and ammunition was put down to "confabulation" — an unconscious trick of the mind in which gaps are filled in with false memories caused by the brain damage he suffered in the Amazon.

The five-strong board of officers that heard the case clearly did not believe Nightingale. He stood to attention in the court as they returned guilty verdicts on the two charges.

Nightingale showed no emotion but his wife seemed close to tears as the judge advocate general, Jeff Blackett, told the board that there was disagreement between the prosecution and defence over the sentencing powers available to them and referred the matter to the court of appeal.

Nightingale showed no emotion as the judge advocate general, Jeff Blackett, told the board that there was disagreement between the prosecution and defence over the sentencing powers available to them, and referred the matter to the court of appeal.

Colonel Charles Barnett, from the Service Prosecuting Authority, later sounded a conciliatory note, saying: "His fine record as a soldier will no doubt be a matter that will be considered carefully when the board consider his sentence."

But the options to be discussed are bound to include a custodial sentence. He may also be formally discharged ahead of his medical discharge in February. Army sources said his excellent record meant that it was unlikely he would be dishonourably discharged.