A Canadian soldier who lost his legs in Afghanistan but since spent three years training as an intelligence officer has been discharged from the military due to a policy that states all soldiers must be able to go into combat.

Cpl. Ryan Elrick is taking the federal government to court, saying the policy known as Universality of Service is discriminatory and unconstitutional.

Elrick, 38, was given a Medal of Sacrifice after he lost his legs in a 2006 IED blast in Afghanistan. A third-generation soldier from Winnipeg, he was on his second tour in the war-torn country when the light-armoured vehicle he was riding in triggered the improvised bomb.

"It was a pretty big bomb that hit us," he told CTV on Friday. "My legs were shredded. They amputated both my legs. One below the knee and one above."

After returning home for rehabilitation and learning to walk on prosthetic legs, he got back to work for the Canadian Forces. He was trained as an intelligence officer and spent the past three years working alongside NORAD. In that time, he obtained high-level security clearance and performed tasks normally assigned to people several ranks above him.

Elrick received praise-filled evaluations lauding his "outstanding leadership," "excellent military bearing," and "adherence to high Canadian Forces ethics and values."

In March, everything changed. Despite promises from commanding officers that he would be promoted, Elrick was discharged from the military. A review of his file conducted in July 2010 deemed him unfit for military service because the National Defence Act states all Canadian Forces personnel must be eligible for all duties at all times.

The policy says soldiers must be able to perform combat duties, meaning permanently injured soldiers are ineligible to serve in any capacity.

Elrick says that's unfair, claiming even former Chief of Defence Staff Gen. (Ret.) Rick Hillier once assured him that his injuries wouldn't prevent him from maintaining a job with the Forces.

"I feel that veterans deserve much better," said Elrick. "Especially combat veterans, especially people that lost limbs and bled for this country. I think they deserve much better than what they are getting."

His lawyer says the policy goes against the Canadian Charter of Rights and Freedoms and has filed a suit with the Manitoba's Court of Queen's Bench.

The statement of claim says the policy "perpetuates prejudice and stereotyping by asserting that a person is unqualified or unable to do the work required of them because of an irrelevant personal characteristic."

Elrick hopes Universality of Service will be found unconstitutional, or that the court gives him an exemption that allows him to continue with the military.

The Department of National Defence has refused to comment on the case while the matter is before the courts.

With a report by CTV's Jill Macyshon and files from The Canadian Press