In the forward to this ballad in The Minstrelsy of the Scottish Border, Sir Walter Scott claims that he wrote the War Song "in apprehension of an invasion." Scott had volunteered with the 80th Foot Regiment, Royal Edinburgh Volunteer Light Dragoons and was in service when Villeneuve broke the blockade at Toulon and attempted to rally the French-Spanish Coalition fleet. Britain was a flutter because the Coalition fleet would give Napoleon the military clout to attempt an invasion of the isle.

Villeneuve was eventually stopped at the historical Battle of Trafalgar and the invasion never took place. It was, perhaps, the most important battle in history, but was chiefly a naval encounter that took place a long way away from the volunteer forces of the homeland. This didn't stop them from marching about and worrying a lot though, such is the way of military life.

It's unlikely that this ballad was written as Scott states however, as the Battle of Trafalgar took place in 1805 and the War Song was first published a year before the battle (1804) in Scots Magazine. Not surprising really when one considers Scott's other flights of fancy. It's also said that while serving as a cavalryman, he once rode a hundred miles in a day to warn of an invasion that was later found to be a false alarm. Presumably this also refers to the Battle of Trafalgar as it's the only major invasion fear during the time of Scott's service. While it's true that the 80th regiment was a formidable volunteer group that at one time measured 2000 men, a regiment of cavalry and two corps of artillery with 12 guns a piece, Scott's role was administrative. He was the quartermaster, paymaster and secretary, not a cavalryman and it's extremely unlikely that the service of a hundred mile ride was necessary to warn of an invasion that was stopped near the Straight of Gibraltar.

Sir Walter Scott was a grand story teller, of this there can be little doubt. So believable were his fictions that he was able to convince an entire nation to don a mostly fictional clan system of clothing. Regardless of his dalliance with the facts, Scott was a wonderful writer and helped considerably in the preservation of ancient ballads. The following ballad was eventually added to his multivolume set of The Minstrelsy of the Scottish Border published multiple times and frequently amended during the period of 1803 to 1880 or so. The War Song, seen here, has been adopted by many cavalry and foot units in both the United Kingdom and the United States of America as a fight song, creed or toast.

WAR-SONG
Of the Royal Edinburgh Light Dragoons

To horse! to horse! the standard flies,
The bugles sound the call;
The Gallic navy stems the seas,
The voice of battle's on the breeze,
Arouse ye, one and all!

From high Dunedin's towers we come,
A band of brothers true;
Our casques the leopard's spoils surround,
With Scotland's hardy thistle crown'd;
We boast the red and blue. *

Though tamely crouch to Gallia's frown
Dull Holland's tardy train;
Their ravish'd toys though Romans mourn
Though gallant Switzers vainly spurn,
And, foaming, gnaw the chain;

Oh! had they mark'd the avenging call, **
Their brethren's murder gave,
Disunion ne'er their ranks had mown,
Nor patriot valour, desperate grown,
Sought freedom in the grave!

Shall we, too, bend the stubborn head,
In Freedom's temple born,
Dress our pale cheek in timid smile,
To hail a master in our isle,
Or brook a victor's scorn?

No! though destruction o'er the land
Come pouring as a flood,
The sun, that sees our falling day,
Shall mark our sabres' deadly sway.
And set that night in blood.

For gold let Gallia's legions fight;
Or plunder's bloody gain;
Unbribed, unbought, our swords we draw,
To guard our king, to fence our law,
Nor shall their edge be vain.

If ever breath of British gale
Shall fan the tri-colour,
Or footstep of invader rude,
With rapine foul, and red with blood,
Pollute our happy shore, -

Then farewell home! and farewell friends!
Adieu each tender tie!
Resolved, we mingle in the tide,
Where charging squadrons furious ride,
To conquer or to die.

To horse! to horse! the sabres gleam;
High sounds our bugle call;
Combined by honour's sacred tie,
Our word is Laws and Liberty!
March forward, one and all!

Bibliography
http://www.btinternet.com/~james.mckay/yeoman03.htm
http://www.electricscotland.com/history/other/scott/warsong.htm
http://larsthompson.8m.com/Poetry/Scott.html
http://www.voodoo.cz/victory/trafalgar.html
Scott, Walter, Sir The Minstrelsy of the Scottish Border. Edited by T.F.Henderson.
  Edinburgh, W. Blackwood; New York, Scribner, 1902