William McLelland of the 2nd Battalion Scots Guards fought the Germans in North Africa before spending more than two years as a prisoner of war in Italy.
He was 97 when he died at his home in Wishaw, North Lanarkshire, and initial investigations failed to find any living relatives.
But around 90 people filled Holytown Crematorium following an emotional appeal launched by the funeral arranger, after she discovered his military history.
Alongside retired and serving Scots Guards, members of the British Legion, police officers, friends, former neighbours and strangers including even children in school uniform were Mr McLelland’s estranged son and daughter who travelled from Belfast after they were traced at the last moment.
Serving Scots Guards acted as pall-bearers, while the regiment also provided a Union flag to be draped over Mr McLelland’s coffin, on which was placed a regimental forage cap and ceremonial belt.
The funeral was led by the Reverend Angus Smith, former chaplain to the Scots Guards, who gave the regimental prayer, and eulogy was given by Captain John Ford, describing Mr McLelland’s service during the war.
A lone regimental piper played the lament, Flowers of the Forest.
Neil Crockett, secretary of the Fife branch of the Scots Guards Association, who was closely involved in arrangements for the funeral service, said: “The Scots Guards is a family Regiment and we wanted to make sure Willie McLelland was given a proper funeral.
“After the sad circumstances came to light, some members of his family were located and they were able to travel from Belfast to be here at short notice.
“I’m delighted we were able to bring all these people together and give him the military funeral service he deserved. When the six pall bearers were being selected to do the job, every one of the team of 20 stood forward.”
Martha McNaught, funeral arranger with Anderson Maguire Funeral Directors, who started the campaign to give Mr McLelland a fitting tribute, said: “When we were asked to arrange Mr McLelland’s funeral, I realised that he was a World War Two veteran and I was keen to ensure he was laid to rest in a manner which would honour him.
“As a company, we are humbled and honoured to have arranged a funeral service which paid fitting tribute to Mr McLelland’s service to his country.”
Speaking after the funeral, Mr McLelland’s son William and daughter, Frances Spratt, said: “We were glad to have been able to attend our father’s funeral today at short notice.
“It was a fitting tribute to his military career and we would like to extend our grateful thanks to friends and neighbours and to Anderson Maguire Funeral Directors and all the members of the Scots Guards, the British Legion and other ex-servicemen who were in attendance.”
William McLelland was born in Larkhall, Lanarkshire, on 30 May 1919, and was a miner before enlisting with the Scots Guards in 1939.
After recruit training at Chelsea Barracks, in London, he joined 2nd Battalion Scots Guards in Egypt in January 1940 and fought in a number of battles in the Western Desert Campaign against the Germans.
He was captured during the Battle of Gazala in June 1942, when the 2nd Battalion Scots Guards defending an exposed ridge were overrun by tanks of the German 21st Panzer Division.
William was reported missing, and later confirmed as a Prisoner of War. He was held in Italy for two years and 130 days until he was repatriated to UK in October 1944.
Mr McLelland was discharged from the Scots Guards on 9 June 1946 and resumed his mining career.
During his service, 2nd Battalion Scots Guards took part in actions in North Africa, Halfaya, Sidi Suleiman and Knightsbridge. Gazala is a main Battle Honour borne on the Colours of the Regiment.
Former neighbours described Mr McLelland as a real character who liked a blether and would go out of his way to help others.
Rab Stewart, 59, said: “Willie didn’t speak about the war or what he had done in it. He always had a smile on his face. He was politely spoken, modest and didn’t seek praise.
“He must have been a strapping big fella when he was a young man. He was over 6ft and had handsome, rugged features. He’d go out of his way to help anybody.”