At half-past-seven on the first day of July 1916 whistles blew along the British front line trenches on the Somme battlefield as the first wave of British infantrymen went into the attack in what was at the time the largest assault on the German positions.

It was also the first test for the volunteer infantry battalions, which had been raised on the orders of Field Marshal Lord Kitchener when he was appointed Secretary of State for War in 1914. The soldiers came from all over Britain; they were young, idealistic and were on the Western Front of their own free will. In other words, they were the nation in uniform.

Following a week-long bombardment involving the firing of a million shells along a 25-mile front it was thought the Germans had been suitably softened up and the attacking infantry were confident they would brush aside the opposition.

Read more: Nation marks Battle of Somme anniversary with two minute silence

As the explosions died down men clambered up scaling ladders and began their advance in the suddenly eerie silence of what promised to be a fine summer’s morning. Most were confident nothing could have survived such a maelstrom and, while they were naturally nervous, they believed they were about to participate in one of the glorious moments of the war.

Among those going over the top that morning was the treasurer of the Glasgow Boys Brigade, Lieutenant-Colonel David Laidlaw, commanding 16th Highland Light Infantry, who remembered that his men were “singing and whistling as if they were going to a football match instead of one of the most serious encounters in the world’s history”.

All his men had connections with the Boys Brigade and came from Glasgow but alas, for all their enthusiasm, the Somme was to be remembered as the killing ground of the British Army.

No other battlefield of the First World War created more casualties per square yard and the opening day of the battle was the bloodiest of the war for the infantry regiments which took part in the initial attack.

Of the 132,000 men who began the assault that morning 57,470 men were casualties – 21,392 killed or missing, 35,493 wounded and 585 taken prisoner.

In their number were 554 soldiers of Laidlaw’s battalion who were killed or wounded while attacking a heavily defended German position known as the Leipzig Salient on the Thiepval ridge.

In the following days the casualty lists in Glasgow’s newspapers were thick with local names and hardly any part of the city was unaffected by the losses.

While other Scottish regiments suffered equally grievously the 16th Highland Light Infantry was crammed with men who had been brought up together and came from the same locality.

There was a reason for their presence on the Somme. One of the most popular manifestations of the rush to volunteer had been the formation of “pals” battalions – so-called because they kept together volunteers from the same cities or towns, or from working, sporting or social clubs. All told, 215 “pals” battalions were formed and, although the title was never fully recognised in Scotland, the concept of men serving together did catch on, especially in the cities.

In Glasgow three such battalions were formed to serve with the local regiment, the Highland Light Infantry. The first was raised from the city’s public transport service on September 7, 1914, when more than a thousand motormen and conductors of the tramways department paraded through the city to join up. In no time the Coplawhill tramways depot became a giant recruiting hall and it took just 16 hours to enlist the men who formed the 15th (Tramways) Battalion, Highland Light Infantry.

Encouraged by that success, approval was then given to the Glasgow Boys’ Brigade to form a 16th battalion for the same regiment. The move caused a great deal of public excitement and there was no shortage of young men who shared common ideals and interests.

“Nobly have those formerly connected with the Boys Brigade movement rallied to the flag,” noted a patriotic journalist in the Glasgow Post.

“Never will it be said that men who were connected with the Boys’ Brigade throughout the length and breadth of the United Kingdom and Ireland funked in the hour of Britain’s need,”

A few days later, a third “pals” battalion, 17th Highland Light Infantry, was formed at the instigation and cost of the Glasgow Chamber of Commerce with recruits being enrolled in the Lesser Hall of the Merchants House.

All three battalions served together in the 32nd Division and by a quirk of history all three were destined to be in action on the first day as well as the last day of the Somme when the fighting continued into the middle of November. The final act was played out to the north of the village of Beaucourt in the Beaumont Hamel sector on November 18 when the 32nd Division was ordered to attack two German defensive systems called Munich Trench and Frankfurt Trench.

By then the summer sun of July was a distant memory: according to the division’s war diary the objectives were attacked “in whirling sleet which afterwards turned to rain, the infantry groping their way forward as best they could through half-frozen mud that was soon to dissolve into chalky slime”.

The Highland Light Infantrymen fared little better than they had done on the first day. Of the 671 officers and men who went into action with the 16th battalion 403 did not make it to the final roll-call three days later but even when the last attack of the Somme was called off, it was not the end of the suffering for the Boys Brigade pals from Glasgow.

During the attack three platoons fought their way into the Frankfurt Trench but were marooned when the rest of the division withdrew. About a hundred men found themselves cut off and with no hope of escape they set about barricading a section of the trench to repel the expected German counter-attack.

It soon became painfully clear they were unable to offer protracted resistance but they possessed a stubborn will and perhaps too they took comfort in the Boys Brigade motto: “Sure and Steadfast”.

They were also motivated by their senior NCO, Company Sergeant Major George Lee, a roads foreman with Glasgow Corporation in civilian life, and against the odds they managed to hold out until November 25, a week after the original attack.

To their credit the Germans sent a party under a white flag to encourage the remaining men to surrender but the offer was rejected. Eventually the Germans mounted a huge attack only to find that the opposition had been reduced to 15 able-bodied men and 30 wounded who were “isolated, exhausted with little ammunition left”. The rest, including Lee, were dead.

The last stand of the 16th Highland Light Infantry marked the end of the Battle of the Somme as offensive operations were no longer possible following the onset of atrocious weather.

Today the sacrifice of those Glasgow volunteer soldiers is commemorated by a plaque in the village of Authuille close to the Thiepval memorial to the dead of the Somme.

Not far away, at Beaumont Hamel, stands the 51st Highland Division’s memorial, a magnificent cairn topped by a kilted Highland soldier which looks over the old German lines. Its inscription would have raised a knowing smile from those Boys Brigade soldiers who lie in the nearby cemeteries.

Translated from Gaelic – Là a’ bhlàir’s math na càirdean – it reads simply: “Friends are good on the day of battle.”