A Royal Navy medic has been sentenced to seven months' detention for refusing rifle training prior to deployment in Afghanistan after developing moral objections, following revelations made by WikiLeaks.

Michael Lyons, 25, was found guilty of wilful disobedience of a lawful order at a military hearing on Tuesday. He had served since 2005 as a medical assistant submariner. He was demoted and dismissed from the navy.

Lyons's case had been the first heard since 1996 by the Advisory Committee on Conscientious Objectors, which considers appeals from serving forces personnel to resign or retire on moral grounds. His was one of only 37 cases considered by the committee in its 41-year life. The committee rejected Lyons's appeal for conscientious objector status in December, leading to Tuesday's hearing.

The court martial, at Portsmouth naval base, heard that on 20 September 2010, Lyons refused pre-deployment assault rifle training, repeatedly requesting to be assigned to a non-combat role.

Speaking in court, Lyons confirmed he had no physical or mental impairment preventing him following orders, but had chosen to disobey orders based on his personal convictions.

"My initial objections started with Afghanistan and I wanted to investigate the reasons why we were at war. At the time WikiLeaks came along and mentioned Iraq and Afghanistan. The reports said there had been some civilian casualties that nobody knew about and they were being covered up," he said.

"After a lot of deliberation I decided I was a conscientious objector."

Lyons claimed he was told he would be barred from treating Afghan civilians, and this formed part of his objection.

He said: "We were put into scenarios and in one of these a family had been walking for two days to our base. The child had a birth defect that was causing it pain and the instructor asked us whether they would get treatment. I said we would offer them whatever we could, but I was shouted down by an officer who said it was a waste of resources."

Warrant Officer Robert Bainbridge, who issued the training order, told the court he discussed Lyons's objections for hours.

"We spent six hours in my office talking about the issue. I told him that as a medic he is in a combative and non-combative role and had an inherent right to self-defence. He briefed me that he felt that the war in Afghanistan was unjust, but I told him I was not sending him to war, I was training him how to use a rifle."

Lyons was unable to speak publicly about his case, but his wife, Lillian, wrote in the Guardian that she felt his appeal for conscientious objector status was damaged because of his lack of religious belief.

"[Michael] was ordered to see a chaplain, even though Michael is an atheist, and the chaplain's statement implied Michael had a slight political reservation, not a moral objection," she said. "If Michael had been dishonest and said he was a committed Christian, and because of his faith he could not be part of war on moral grounds, perhaps this would have been over in an instant."

Speaking after the trial on behalf of Lillian Lyons, Emma Sangster, co-ordinator of pressure group Forces Watch, said: "This seems a deliberately harsh sentence, which serves not only to punish Michael but to dissuade others from following his actions.

"Considering that servicemen have a right to conscientious objection and this inevitably comes to be a point where an order is not going to be obeyed, I think this indicates that the armed forces don't take conscientious objection seriously and are seeking to undermine it."

"I hope that people will realise from this they do have a right to object on grounds of conscience and that there is a process, albeit a very obscure one, which they can follow."

Sangster also added on her own behalf: "Michael has been extremely courageous to act on his conscience and remain consistent and dignified throughout this whole process.

"We urge MPs to uphold the human rights of forces personnel by clarifying and strengthening the right to conscientious objection, and the procedures for it in the armed forces bill currently going through parliament."

The Ministry of Defence declined to comment on the case.