A Munich court on Thursday rejected a US soldier's application for asylum in Germany.

Andre Shepherd, 39, deserted the Katterbach Kaserne military base in southern Germany in 2007 after he was ordered to do a second tour in Iraq. Shepherd had told the court he feared he would be forced to become involved in war crimes if he went.

The court dismissed Shepherd's case, however, ruling that he had not exhausted all available avenues to leave the military before deserting.

The presiding judge, Josef Ruber, also said Shepherd was unable to prove he would have been confronted by war crimes had gone back to Iraq.

The ruling is a long time coming. Shepherd initially applied for asylum in 2008, but after seeing his first claim denied by the Federal Ministry for Refugees in 2011, he appealed on the back of a European directive that protects military deserters who have witnessed human rights violations in combat and, as a result, feared persecution.

The case eventually made it to the European Court of Justice, which last year remanded the case back to the German court saying it was its duty to prove whether US soldiers were commiting war crimes in Iraq and whether Shepherd risked being involved in such crimes if he went.

Ruber, however, reportedly did not focus on the war crimes accusation. Instead, he questioned whether Shepherd's argument was credible. Ultimately, the judge ruled that Shepherd had not seriously considered terminating his military service before he was ordered to do a second tour. He also made no attempt to join a different military unit before deserting.

On the question of human rights, Ruber said it was not for the Munich court to decide whether the US invasion of Iraq had violated international law or whether the military had committed war crimes there.

Former US soldier Andre Shepherd stands with supporters outside the court in Munich.

The "Evangelische Arbeitsgemeinschaft für Kriegsdienstverweigerung und Frieden," a German organization of churches that addresses issues regarding military service, criticized the court's handling of the case before Thursday's verdict was read out. The group accused the court of focusing too much on the credibility of Shepherd's defense, rather than his claims of war crimes.

"I would have preferred to see the court investigate other key points in the trial and respect the applicant's freedom of belief and conscience," the group said.

The human rights body Pro Asyl also condemned the court ruling. In a statement, it said the court had relied solely on the credibility of the plaintiff, questioned facts that had occurred as far back as 12 years ago and deemed that the plaintiff's conscience could be accurately examined at all times.

Shepherd was expected to "outline his view of the situation at the time," while "his decisions were evaluated by the chamber from today's point of view," Pro Asyl said.

Pro Asyl spokesman Bernd Mesovic added, "I've never seen such a one-sided game play out in the German courts."

Shepherd's lawyer, Reinhard Max, said his client would appeal the court's verdict.

The ruling does not mean that Shepherd has to leave the country. He has a permit to remain in Germany as his wife is German.

dm/sms (dpa, KNA, epd, AFP)