It was a rifle. The K98k was made by Germans during WW2 and is one of the best rifles ever made. It's the finest bolt action after the Springfield rifle and is excellently suited to both combat and sniping.
It was used as a sniper rifle too and was the main rifle used by the Germans. It was so good that countries still keep thousands of these in storage for use in a war that drains their armory.