The melody is traditional and dates back to the 16th Century. James Hogg the Scottish Border poet put words to it around 1819. The title is Welsh and is actually "Tyr y Bas y Tyr y Odin", in english "Tyr be with us, Tyr and Odin'. Tyr and Odin are old Norse gods.