The longsword was a medieval weapon used by knights during the Middle Ages.
In 2367, as part of Q's Robin Hood scenario, the majority of the USS Enterprise-D's command crew were given longswords, as were Guy of Gisbourne and his knights. Jean-Luc Picard ended up killing Guy with his sword. (TNG: "Qpid")
Later in 2371, Harry Kim's holoprogram had many characters armed with longswords, most notably Freya and Unferth. The Doctor also later wielded a sword and defeated Unferth in combat with it. (VOY: "Heroes and Demons")