A sniper rifle was a firearm created for ground-based long-ranged attacks, sometimes used in assassination attempts.
In 2152, deuterium miners used a wide variety of weapons, including a sniper rifle, as they worked to drive off the Klingons. (ENT: "Marauders")
Colonel West, disguised as a Klingon, used a sniper rifle while attempting to assassinate the Federation President in 2293. (Star Trek VI: The Undiscovered Country)