When I was a kid I watched a movie on TV that I never knew its name, it was an old animated movie. I think it was an European very rare movie because of the style of the animation, drawings but above all the plot. The story as far as I remember something like this (it may be not accurate as I was pretty young in that time and I watched it only once so very few images remain in my memory):
The story lives inside a magical world of faeries and dwarves or gnomes, there is a very bad guy (Sauron like) that kidnaps the main character's girlfriend or wife or some important relative. Then this dwarf starts his journey to get to the bad guy's fortress and rescue his beloved one.
At some point the protagonist comes to the land of the fairies so they will help him to find the path to the bad guy's lair. He discovers that he is somehow related to the fairies, maybe one of his ancestors was a fairy or something like that.
Everything looks very linear and predictable until now, but the end of the story breaks the paradigms:
Finally the dwarf-gnome gets to the bad guy fortress or castle and when he meets him he suddenly and surprisingly takes out a gun and holding it in his hand shoots and kills the bad guy. This was not expected as the main goal of the character seemed to be just rescuing his relative but not take revenge in a violent fashion.
That part really impacted me as the cute, shy and naive character turns calculating and treacherous at the very last moment (something similar to when Frodo decides not to drop the ring at the very last time which is my favorite part of LOTR)
Another thing that is interesting in this last scene is the strange object "The gun" that appears in an environment that was supposed to be a magical D&D style without any man made powder-fire based device presence at all.
Does anyone has a clue or reference that can help me to find which movie is this?