Nineteen-year-old Christopher Cameron had previously pleaded guilty to being in possession of the item in the High Street, opposite the Isobar nightclub, on March 22.
Fiscal depute Nadine Dormer told the court that door stewards at the club had s
een Cameron standing in an alleyway across the street from the club, holding the sword in both hands and waving it above his head.
Police were called to the scene, and though Cameron no longer had the sword in his possession when the officers arrived, a search of nearby bins and gardens found the item buried in a hedgerow a short time later.
Jim Hannay, defending, said Cameron had indicated to him that the sword was purely ornamental and for display at home, and that the accused had merely taken it to an area where the public did not normally to go show it off to his friends.
Before sentencing, Sheriff John Herald told Cameron: "This court has repeatedly made it clear that it will not tolerate situations where people walk about this town with weapons.
"But here we have someone with a record for violence, waving a sword about outside a nightclub in the early hours of the morning. There is only one disposal."
Cameron, address given as 95 High Street, was sentenced to four months in prison for being in possession of an offensive weapon in a public place, and a further month because the offence had been committed while he was on bail.
The full article contains 291 words and appears in The Buteman newspaper.