BERLIN (AP) — A German court has ruled that a dog owner isn’t fit to carry a firearms license after his dog shot him with a rifle.

The Munich administrative court on Tuesday dismissed the man’s appeal against an earlier decision by Bavarian authorities to withdraw his license to own a rifle, as well as his hunting permit.

The decision followed a 2016 incident in which the man, a passionate hunter, was shot in the arm after his dog managed to release the trigger on a loaded rifle that was lying in his car.

The court ruled the hunter couldn’t be relied upon “because it must be assumed that he will handle firearms and ammunition carelessly in future as well.”

The man, whose name wasn’t released, can appeal the verdict.