In July 1797 the Militia Act was raised to enable Lord Lieutenants and landowners to recruit a local force to guard against invasion and internal rebellion. Men aged 19 to 23 were chosen by ballot, with schoolteachers, ministers, the infirm and poor men with more than two children exempted; those with means could buy their way out, and it was possible to put forward a substitute, if one could be found. Throughout Scotland the Act was generally despised, as a sort of random recruitment that fell heaviest on the poor, and riots ensued.
However “volunteer” companies existed prior to the Militia Act, as part-time forces paid a shilling or two a week. As with the RNR in the 19th and 20th centuries, volunteering was not altogether unpopular, after some initial resistance, as it brought some cash into the economy while allowing men to remain at home. The Seafield Muniments list eight companies of 63 men each in Harris and the Uists,six of them pre-dating the Act of 1797. See Andrew MacKillop’s “The Outer Hebrides During the Wars of Empire, 1750-1815” in Island Heroes (Islands Book Trust) for more detail.
However the situation in Lewis was a little different:
Seaforth was given command of the 2nd Battalion of the North British Militia. Men were raised for these regiments by Ballot. Lewis was to supply 146 men, fourteen from the Parish of Stornoway, thirty-six from Lochs, forty from Barvas and fifty from Uig… Some of those balloted paid others to act as their substitutes., but they had to be fit for service, unmarried and over five feet five inches in height. Deserters from the ballot fled to Harris for refuge but, in spite of this, the Militia provided a good recruiting ground for the regular battalions, 400 men being drafted in 1800 alone.
Lewis: A History of the Island (Donald Macdonald)
The following table from the Seaforth Muniments is a list of militia men in Uig in 1797.